[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: substitute: Error out on unsupported URL schemes.
From: |
Ludovic Courtès |
Subject: |
02/02: substitute: Error out on unsupported URL schemes. |
Date: |
Wed, 09 Mar 2016 22:50:43 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 204d34ff961d6dabf18b255decc29712e03afef0
Author: Ludovic Courtès <address@hidden>
Date: Wed Mar 9 18:34:04 2016 +0100
substitute: Error out on unsupported URL schemes.
Reported in <http://bugs.gnu.org/22937>
by Chris Marusich <address@hidden>.
* guix/scripts/substitute.scm (fetch): Add 'else' case and call 'leave'.
---
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 01cc3f1..0a716a9 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 <address@hidden>
+;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <address@hidden>
;;; Copyright © 2014 Nikita Karetnikov <address@hidden>
;;;
;;; 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?)