diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2016-05-04 16:59:31 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2016-05-04 23:35:55 +0200 |
| commit | 6aaf3ea62d883a717a3459b6c6da3c1cfede55e2 (patch) | |
| tree | 6e6d35ad1ed296a772b0bf68064cc7af3859e32d | |
| parent | 8bf92e3904cb656d4c2160fc8befebaf21a65492 (diff) | |
environment: Use 'break' instead of 'split'.
* guix/scripts/environment.scm (parse-args): Use 'break' instead of
'split'.
| -rw-r--r-- | guix/scripts/environment.scm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index d4c09ef54cc..9ba487d1eb0 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #:use-module (guix packages) | 25 | #:use-module (guix packages) |
| 26 | #:use-module (guix profiles) | 26 | #:use-module (guix profiles) |
| 27 | #:use-module (guix search-paths) | 27 | #:use-module (guix search-paths) |
| 28 | #:use-module (guix utils) | ||
| 29 | #:use-module (guix build utils) | 28 | #:use-module (guix build utils) |
| 30 | #:use-module (guix monads) | 29 | #:use-module (guix monads) |
| 31 | #:use-module ((guix gexp) #:select (lower-inputs)) | 30 | #:use-module ((guix gexp) #:select (lower-inputs)) |
| @@ -499,12 +498,13 @@ Otherwise, return the derivation for the Bash package." | |||
| 499 | 498 | ||
| 500 | ;; The '--' token is used to separate the command to run from the rest of | 499 | ;; The '--' token is used to separate the command to run from the rest of |
| 501 | ;; the operands. | 500 | ;; the operands. |
| 502 | (let-values (((args command) (split args "--"))) | 501 | (let-values (((args command) (break (cut string=? "--" <>) args))) |
| 503 | (let ((opts (parse-command-line args %options (list %default-options) | 502 | (let ((opts (parse-command-line args %options (list %default-options) |
| 504 | #:argument-handler handle-argument))) | 503 | #:argument-handler handle-argument))) |
| 505 | (if (null? command) | 504 | (match command |
| 506 | opts | 505 | (() opts) |
| 507 | (alist-cons 'exec command opts))))) | 506 | (("--") opts) |
| 507 | (("--" command ...) (alist-cons 'exec command opts)))))) | ||
| 508 | 508 | ||
| 509 | (define (assert-container-features) | 509 | (define (assert-container-features) |
| 510 | "Check if containers can be created and exit with an informative error | 510 | "Check if containers can be created and exit with an informative error |
