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/gc.scm | |
parent | ed1f071e98126ceb992faf5f22762f24d36ba9ff (diff) |
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/gc.scm')
-rw-r--r-- | guix/scripts/gc.scm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/guix/scripts/gc.scm b/guix/scripts/gc.scm index 0a9719d259..378a47d113 100644 --- a/guix/scripts/gc.scm +++ b/guix/scripts/gc.scm @@ -159,12 +159,8 @@ Invoke the garbage collector.\n")) (define (guix-gc . args) (define (parse-options) ;; Return the alist of option values. - (args-fold* args %options - (lambda (opt name arg result) - (leave (G_ "~A: unrecognized option~%") name)) - (lambda (arg result) - (alist-cons 'argument arg result)) - %default-options)) + (parse-command-line args %options (list %default-options) + #:build-options? #f)) (define (symlink-target file) (let ((s (false-if-exception (lstat file)))) |