From 204d34ff961d6dabf18b255decc29712e03afef0 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 9 Mar 2016 18:34:04 +0100 Subject: substitute: Error out on unsupported URL schemes. Reported in by Chris Marusich . * guix/scripts/substitute.scm (fetch): Add 'else' case and call 'leave'. --- guix/scripts/substitute.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'guix/scripts/substitute.scm') 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 +;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014 Nikita Karetnikov ;;; ;;; This file is part of GNU Guix. @@ -204,7 +204,10 @@ (define* (fetch uri #:key (buffered? #t) (timeout? #t) (quiet-404? #f)) (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 (%make-cache-info url store-directory wants-mass-query?) -- cgit v1.2.3