summaryrefslogtreecommitdiff
path: root/guix/scripts.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-11-01 10:29:59 +0200
committerEfraim Flashner <efraim@flashner.co.il>2017-11-01 10:29:59 +0200
commit19b7bba1b5f115168b1669325cd51bc66b9dc4b4 (patch)
tree7b4e77080fe6fbc3a54b8612adc3c5c27ab81d05 /guix/scripts.scm
parentf37931d6632627a24e4eccafa1603ffadb649ff6 (diff)
parent5010d0e36452882eb95666467bb983efa8cca081 (diff)
downloadguix-patches-19b7bba1b5f115168b1669325cd51bc66b9dc4b4.tar
guix-patches-19b7bba1b5f115168b1669325cd51bc66b9dc4b4.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'guix/scripts.scm')
-rw-r--r--guix/scripts.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/guix/scripts.scm b/guix/scripts.scm
index 9ff7f25548..4a7ae7baa3 100644
--- a/guix/scripts.scm
+++ b/guix/scripts.scm
@@ -67,11 +67,13 @@ reporting."
(define* (parse-command-line args options seeds
#:key
+ (build-options? #t)
(argument-handler %default-argument-handler))
- "Parse the command-line arguments ARGS as well as arguments passed via the
-'GUIX_BUILD_OPTIONS' environment variable according to OPTIONS (a list of
-SRFI-37 options) and return the result, seeded by SEEDS.
-Command-line options take precedence those passed via 'GUIX_BUILD_OPTIONS'.
+ "Parse the command-line arguments ARGS according to OPTIONS (a list of
+SRFI-37 options) and return the result, seeded by SEEDS. When BUILD-OPTIONS?
+is true, also pass arguments passed via the 'GUIX_BUILD_OPTIONS' environment
+variable. Command-line options take precedence those passed via
+'GUIX_BUILD_OPTIONS'.
ARGUMENT-HANDLER is called for non-option arguments, like the 'operand-proc'
parameter of 'args-fold'."
@@ -85,7 +87,9 @@ parameter of 'args-fold'."
(call-with-values
(lambda ()
- (parse-options-from (environment-build-options) seeds))
+ (if build-options?
+ (parse-options-from (environment-build-options) seeds)
+ (apply values seeds)))
(lambda seeds
;; ARGS take precedence over what the environment variable specifies.
(parse-options-from args seeds))))