diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-10-27 13:28:00 -0700 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-10-28 09:45:53 +0200 |
commit | a1ff7e1d8dfb86ae1817d4e0db4ddeebd2083e83 (patch) | |
tree | 37ae378568444d592f17174bfc90533c55d18a38 /guix/scripts/hash.scm | |
parent | ed1f071e98126ceb992faf5f22762f24d36ba9ff (diff) | |
download | gnu-guix-a1ff7e1d8dfb86ae1817d4e0db4ddeebd2083e83.tar gnu-guix-a1ff7e1d8dfb86ae1817d4e0db4ddeebd2083e83.tar.gz |
scripts: Factorize option parsing sans 'GUIX_BUILD_OPTIONS'.
* guix/scripts.scm (parse-command-line): Add #:build-options? parameter
and honor it.
* guix/scripts/challenge.scm (guix-challenge): Use 'parse-command-line'
with #:build-options? #f instead of 'args-fold*'.
* guix/scripts/gc.scm (guix-gc): Likewise.
* guix/scripts/graph.scm (guix-graph): Likewise.
* guix/scripts/hash.scm (guix-hash): Likewise.
* guix/scripts/lint.scm (guix-lint): Likewise.
* guix/scripts/refresh.scm (guix-refresh): Likewise.
* guix/scripts/size.scm (guix-size): Likewise.
* guix/scripts/weather.scm (guix-weather): Likewise.
Diffstat (limited to 'guix/scripts/hash.scm')
-rw-r--r-- | guix/scripts/hash.scm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm index 1fa6bb8d1f..cae5d6bcdf 100644 --- a/guix/scripts/hash.scm +++ b/guix/scripts/hash.scm @@ -104,13 +104,8 @@ and 'hexadecimal' can be used as well).\n")) (define (guix-hash . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "unrecognized option: ~a~%") - name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (vcs-file? file stat) (case (stat:type stat) |