From 6aaf3ea62d883a717a3459b6c6da3c1cfede55e2 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 May 2016 16:59:31 +0200 Subject: 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(-) (limited to 'guix/scripts/environment.scm') diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index d4c09ef54c..9ba487d1eb 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 -- cgit v1.2.3