Skip to content
Snippets Groups Projects
Unverified Commit db3f2b61 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

pack: Allow for "-S /opt/foo=".

Reported by Andy Wingo.

* guix/scripts/pack.scm (%options): Use 'string-split' instead of
'string-tokenize'.
parent 9e84ea36
No related branches found
No related tags found
No related merge requests found
......@@ -283,9 +283,10 @@ (define %options
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment