[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/09: environment: Use 'break' instead of 'split'.
From: |
Ludovic Courtès |
Subject: |
02/09: environment: Use 'break' instead of 'split'. |
Date: |
Wed, 04 May 2016 21:37:20 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 6aaf3ea62d883a717a3459b6c6da3c1cfede55e2
Author: Ludovic Courtès <address@hidden>
Date: Wed May 4 16:59:31 2016 +0200
environment: Use 'break' instead of 'split'.
* guix/scripts/environment.scm (parse-args): Use 'break' instead of
'split'.
---
guix/scripts/environment.scm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm
index d4c09ef..9ba487d 100644
--- a/guix/scripts/environment.scm
+++ b/guix/scripts/environment.scm
@@ -25,7 +25,6 @@
#:use-module (guix packages)
#:use-module (guix profiles)
#:use-module (guix search-paths)
- #:use-module (guix utils)
#:use-module (guix build utils)
#:use-module (guix monads)
#: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 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)
#:argument-handler handle-argument)))
- (if (null? command)
- opts
- (alist-cons 'exec command opts)))))
+ (match command
+ (() opts)
+ (("--") opts)
+ (("--" command ...) (alist-cons 'exec command opts))))))
(define (assert-container-features)
"Check if containers can be created and exit with an informative error
- branch master updated (af5640d -> e9f693d), Ludovic Courtès, 2016/05/04
- 06/09: gnu: java-qdox: Escape "@" in description., Ludovic Courtès, 2016/05/04
- 02/09: environment: Use 'break' instead of 'split'.,
Ludovic Courtès <=
- 03/09: utils: Remove 'split'., Ludovic Courtès, 2016/05/04
- 05/09: build: Preserve stderr for shell tests., Ludovic Courtès, 2016/05/04
- 01/09: services: herd: Move UI handling to 'guix system'., Ludovic Courtès, 2016/05/04
- 07/09: system: Add procedures to access user accounts and service names., Ludovic Courtès, 2016/05/04
- 08/09: Add (gnu tests) and (gnu build marionette)., Ludovic Courtès, 2016/05/04
- 09/09: tests: Add whole-system test., Ludovic Courtès, 2016/05/04
- 04/09: utils: Move combinators to (guix combinators)., Ludovic Courtès, 2016/05/04