pack: Allow for "-S /opt/foo=".
Reported by Andy Wingo. * guix/scripts/pack.scm (%options): Use 'string-split' instead of 'string-tokenize'.master
parent
9e84ea3673
commit
db3f2b61ad
|
@ -283,9 +283,10 @@ with COMPRESSOR. It can be passed to 'docker load'."
|
||||||
result)))
|
result)))
|
||||||
(option '(#\S "symlink") #t #f
|
(option '(#\S "symlink") #t #f
|
||||||
(lambda (opt name arg result)
|
(lambda (opt name arg result)
|
||||||
(match (string-tokenize arg
|
;; Note: Using 'string-split' allows us to handle empty
|
||||||
(char-set-complement
|
;; TARGET (as in "/opt/guile=", meaning that /opt/guile is
|
||||||
(char-set #\=)))
|
;; a symlink to the profile) correctly.
|
||||||
|
(match (string-split arg (char-set #\=))
|
||||||
((source target)
|
((source target)
|
||||||
(let ((symlinks (assoc-ref result 'symlinks)))
|
(let ((symlinks (assoc-ref result 'symlinks)))
|
||||||
(alist-cons 'symlinks
|
(alist-cons 'symlinks
|
||||||
|
|
Reference in New Issue