channels: Raise an error if dependency's introduction is malformed

* guix/channels.scm (sexp->channel-introduction): Do it.
This commit is contained in:
Josselin Poiret 2023-03-05 11:56:09 +01:00
parent e198fe4e94
commit cacc0cb6ab
No known key found for this signature in database
GPG Key ID: 505E40B916171A8A
1 changed files with 8 additions and 1 deletions

View File

@ -252,7 +252,14 @@ could be found at DIRECTORY or one of its ancestors."
('commit commit) ('signer signer)
_ ...)
(make-channel-introduction commit (openpgp-fingerprint signer)))
(x #f)))
(x (raise (condition
(&message
(message (format #f (G_ "channel dependency has an invalid\
introduction field"))))
(&error-location
(location
(source-properties->location
(source-properties x)))))))))
(define (read-channel-metadata port)
"Read from PORT channel metadata in the format expected for the