GNU bug report logs -
#40039
'wrap-script' introduces spurious argument
Previous Next
Full log
View this message in rfc822 format
It appears the repeated (car cl) results in the executable path getting
sent to it's self as the first argument. I'm not sure how things managed
to work up until now? I tested the following change and it fixed the one
case I was using, but am not sure it is correct. why was the cons (car
cl) there in the first place?
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index b8be73ead4..9610f39d71 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -946,7 +946,7 @@ FILE are kept unchanged."
"patch-shebang: ~a:
changing `~a' to `~a'~%"
file (string-append
interp " " arg1) bin)
(patch p bin rest))
- (begin
+ (begin
(format (current-error-port)
"patch-shebang: ~a:
changing `~a' to `~a'~%"
file interp bin)
@@ -1292,11 +1292,10 @@ not supported."
(_ vars))))
`(let ((cl (command-line)))
(apply execl ,interpreter
- (car cl)
- (cons (car cl)
- (append
- ',(string-split args #\space)
- cl))))))
+ (car cl) ;; The program.
+ (append
+ ',(string-tokenize args
#\space)
+ cl)))))
(template (string-append prog ".XXXXXX"))
(out (mkstemp! template))
(st (stat prog))
This bug report was last modified 3 years and 303 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.