diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:42:12 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:48:46 +0100 |
commit | e82e55e58c67b0215e768c4612ca542bc670f633 (patch) | |
tree | 856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /guix/scripts/download.scm | |
parent | 98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff) | |
parent | e35dff973375266db253747140ddf25084ecddc2 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts/download.scm')
-rw-r--r-- | guix/scripts/download.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/guix/scripts/download.scm b/guix/scripts/download.scm index 533970ffbb..6ebc14f573 100644 --- a/guix/scripts/download.scm +++ b/guix/scripts/download.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,13 +96,17 @@ 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)) (with-error-handling (let* ((opts (parse-options)) (store (open-connection)) - (arg (assq-ref opts 'argument)) + (arg (or (assq-ref opts 'argument) + (leave (_ "no download URI was specified~%")))) (uri (or (string->uri arg) (leave (_ "~a: failed to parse URI~%") arg))) |