GNU bug report logs -
#40039
'wrap-script' introduces spurious argument
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
I have a script that starts with:
--8<---------------cut here---------------start------------->8---
#!/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash
#
--8<---------------cut here---------------end--------------->8---
When I call ‘wrap-script’ on it, it leads to:
--8<---------------cut here---------------start------------->8---
#!/gnu/store/0awhym5h0m890n0wq87y0dxznh14rk88-guile-next-3.0.1/bin/guile --no-auto-compile
#!#; Guix wrapper
#\-(begin (setenv "PATH" "/gnu/store/9kzrrccpzl6i1sfwb0drb00gi2gwk0x0-coreutils-8.31/bin"))
#\-(let ((cl (command-line))) (apply execl "/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash" (car cl) (cons (car cl) (append (quote ("")) cl))))
#!/gnu/store/29jhbbg1hf557x8j53f9sxd9imlmf02a-bash-minimal-5.0.7/bin/bash
#
--8<---------------cut here---------------end--------------->8---
The expression (append '("") cl) is incorrect: the empty string
shouldn’t be added here.
I think one way to fix it is:
[Message part 2 (text/x-patch, inline)]
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index b8be73ead4..f9698773c3 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1295,7 +1295,8 @@ not supported."
(car cl)
(cons (car cl)
(append
- ',(string-split args #\space)
+ ',(string-tokenize args
+ char-set:graphic)
cl))))))
(template (string-append prog ".XXXXXX"))
(out (mkstemp! template))
[Message part 3 (text/plain, inline)]
Ludo’.
This bug report was last modified 3 years and 285 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.