unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#74450: patch-shebang does not work with '/usr/bin/env -S'
@ 2024-11-21  0:42 Théo Tyburn
  0 siblings, 0 replies; only message in thread
From: Théo Tyburn @ 2024-11-21  0:42 UTC (permalink / raw)
  To: 74450

Hi guix,

I noticed that 'patch-shebang' in (guix build utils) does not work if
the shebang is something like '#!/usr/bin/env -S python3 -u'. So it is
not able to patch shebangs with multiple arguments
https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#g_t_002dS_002f_002d_002dsplit_002dstring-usage-in-scripts

With the shebang above I get this error in the build phase:
"patch-shebang: main.py: warning: no binary for interpreter `-S' found
in $PATH". By looking at the function, this makes sense since in the
let* bindings 'cmd' is bind to 'arg1' which is just '-S'. So the fix
would not be too hard to implement.

Cheers,

Théo




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-11-21  0:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-21  0:42 bug#74450: patch-shebang does not work with '/usr/bin/env -S' Théo Tyburn

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).