guix_mirror_bot pushed a commit to branch world-rebuild
in repository guix.

commit 021c662f60cefbc52d7c26f37fc8cf04a41f8fe0
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Mon Aug 3 18:39:44 2026 +0900

    Revert "utils: Set $0 to basename of command in `wrap-program'."
    
    This reverts commit df94888eca214c496b5cdf57795e03b96866c3af.
    It ended up causing more issues than it solved.
    
    Merges: https://codeberg.org/guix/guix/pulls/10307
    References: https://codeberg.org/guix/guix/issues/3629
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 guix/build/utils.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 7003d8262f..94714bf397 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -1355,7 +1355,7 @@ contents:
   #!location/of/bin/bash
   export PATH=\"/gnu/.../bar/bin\"
   export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/gnu/.../baz/certs:/qux/certs\"
-  exec -a \"${0##*/}\" location/of/.foo-real \"$@\"
+  exec -a $0 location/of/.foo-real \"$@\"
 
 This is useful for scripts that expect particular programs to be in $PATH, for
 programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
@@ -1432,7 +1432,7 @@ with definitions for VARS. If it is not, SH will be used 
as interpreter."
         (call-with-output-file prog-tmp
           (lambda (port)
             (format port
-                    "#!~a~%~a~%exec -a \"${0##*/}\" \"~a\" \"$@\"~%"
+                    "#!~a~%~a~%exec -a \"$0\" \"~a\" \"$@\"~%"
                     sh
                     (string-join (map export-variable vars/filtered) "\n")
                     (canonicalize-path wrapped-file))))

Reply via email to