aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-11-23 17:37:29 +0100
committerLudovic Courtès <ludo@gnu.org>2015-11-23 17:48:35 +0100
commit86cdfc451bad61faa66f100208c95f3275050957 (patch)
tree6bf201b92611a5e196c58e03c4b2dadebcbb8d0e /guix
parent71ae18ee52757eb60be50bb2e50bab5e84d0f097 (diff)
downloadgnu-guix-86cdfc451bad61faa66f100208c95f3275050957.tar
gnu-guix-86cdfc451bad61faa66f100208c95f3275050957.tar.gz
guix download: Fail when more than one URL is passed.
* guix/scripts/download.scm (guix-download)[parse-option]: Call 'leave' when passed an extra argument. * tests/guix-download.sh: Add test.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/download.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm
index b81295e5d9..6ebc14f573 100644
--- a/guix/scripts/download.scm
+++ b/guix/scripts/download.scm
@@ -96,6 +96,9 @@ Supported formats: 'nix-base32' (default), 'base32', and 'base16'
(lambda (opt name arg result)
(leave (_ "~A: unrecognized option~%") name))
(lambda (arg result)
+ (when (assq 'argument result)
+ (leave (_ "~A: extraneous argument~%") arg))
+
(alist-cons 'argument arg result))
%default-options))