diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-03-16 22:46:43 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-03-16 22:50:15 +0100 |
commit | db3f2b61adfe56d69029ec5f6d962462a50a1f33 (patch) | |
tree | df687577323e123a38559cef6a54d3d374941059 /guix | |
parent | 9e84ea3673f77ebe5c5e9ce39fbcdb6d7bc8a06f (diff) | |
download | gnu-guix-db3f2b61adfe56d69029ec5f6d962462a50a1f33.tar gnu-guix-db3f2b61adfe56d69029ec5f6d962462a50a1f33.tar.gz |
pack: Allow for "-S /opt/foo=".
Reported by Andy Wingo.
* guix/scripts/pack.scm (%options): Use 'string-split' instead of
'string-tokenize'.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/scripts/pack.scm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index edeb82fafd..74d4ee6d4d 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -283,9 +283,10 @@ with COMPRESSOR. It can be passed to 'docker load'." result))) (option '(#\S "symlink") #t #f (lambda (opt name arg result) - (match (string-tokenize arg - (char-set-complement - (char-set #\=))) + ;; Note: Using 'string-split' allows us to handle empty + ;; TARGET (as in "/opt/guile=", meaning that /opt/guile is + ;; a symlink to the profile) correctly. + (match (string-split arg (char-set #\=)) ((source target) (let ((symlinks (assoc-ref result 'symlinks))) (alist-cons 'symlinks |