diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-09 18:34:04 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-09 23:47:49 +0100 |
commit | 204d34ff961d6dabf18b255decc29712e03afef0 (patch) | |
tree | 536bfa5d54b3962f64f932fcb86ba7471dcfe9be /guix | |
parent | bec7f352145699c929425397957c52a3829623cf (diff) |
substitute: Error out on unsupported URL schemes.
Reported in <http://bugs.gnu.org/22937>
by Chris Marusich <cmmarusich@gmail.com>.
* guix/scripts/substitute.scm (fetch): Add 'else' case and call 'leave'.
Diffstat (limited to 'guix')
-rwxr-xr-x | guix/scripts/substitute.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 01cc3f129e..0a716a95fd 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Nikita Karetnikov <nikita@karetnikov.org> ;;; ;;; This file is part of GNU Guix. @@ -204,7 +204,10 @@ to the caller without emitting an error message." (set! port (open-socket-for-uri uri)) (unless buffered? (setvbuf port _IONBF))) - (http-fetch uri #:text? #f #:port port)))))))) + (http-fetch uri #:text? #f #:port port)))))) + (else + (leave (_ "unsupported substitute URI scheme: ~a~%") + (uri->string uri))))) (define-record-type <cache-info> (%make-cache-info url store-directory wants-mass-query?) |