environment: Use 'break' instead of 'split'.
* guix/scripts/environment.scm (parse-args): Use 'break' instead of 'split'.
This commit is contained in:
parent
8bf92e3904
commit
6aaf3ea62d
|
@ -25,7 +25,6 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix profiles)
|
#:use-module (guix profiles)
|
||||||
#:use-module (guix search-paths)
|
#:use-module (guix search-paths)
|
||||||
#:use-module (guix utils)
|
|
||||||
#:use-module (guix build utils)
|
#:use-module (guix build utils)
|
||||||
#:use-module (guix monads)
|
#:use-module (guix monads)
|
||||||
#:use-module ((guix gexp) #:select (lower-inputs))
|
#:use-module ((guix gexp) #:select (lower-inputs))
|
||||||
|
@ -499,12 +498,13 @@ Otherwise, return the derivation for the Bash package."
|
||||||
|
|
||||||
;; The '--' token is used to separate the command to run from the rest of
|
;; The '--' token is used to separate the command to run from the rest of
|
||||||
;; the operands.
|
;; the operands.
|
||||||
(let-values (((args command) (split args "--")))
|
(let-values (((args command) (break (cut string=? "--" <>) args)))
|
||||||
(let ((opts (parse-command-line args %options (list %default-options)
|
(let ((opts (parse-command-line args %options (list %default-options)
|
||||||
#:argument-handler handle-argument)))
|
#:argument-handler handle-argument)))
|
||||||
(if (null? command)
|
(match command
|
||||||
opts
|
(() opts)
|
||||||
(alist-cons 'exec command opts)))))
|
(("--") opts)
|
||||||
|
(("--" command ...) (alist-cons 'exec command opts))))))
|
||||||
|
|
||||||
(define (assert-container-features)
|
(define (assert-container-features)
|
||||||
"Check if containers can be created and exit with an informative error
|
"Check if containers can be created and exit with an informative error
|
||||||
|
|
Loading…
Reference in New Issue