News for hackers. Stuff that matters.
Re:uv Running a Script with Dependencies by anthk on Tuesday July 22, 2025 @04:24AM (#44644510)
'env -s' it's not portable.
Re:uv Running a Script with Dependencies by brewmarche on Tuesday July 22, 2025 @06:24AM (#44645202)
Should be portable as long as there are no quotes. It’s basically a nop on macOS since in macOS the shebang args are already split by spaces (even when quoted).

Edit: further reading <https://unix.stackexchange.com/a/605761/472781> and <https://unix.stackexchange.com/a/774145/472781> and also note that on older BSDs it also used to be like that

Re:uv Running a Script with Dependencies by anthk on Tuesday July 22, 2025 @09:00AM (#44646342)
Not under OpenBSD.
Re:uv Running a Script with Dependencies by brewmarche on Tuesday July 22, 2025 @09:17AM (#44646503)
Thanks for pointing it out.

Indeed, OpenBSD’s and NetBSD’s `env` does not support `-S`. DragonflyBSD does (as expected).

Solaris as pointed out by the first link doesn’t even support more than one argument in the shebang so no surprise that its `env` does not support it either. Neither does IllumOS (but not sure about the shebang handling)

Re:uv Running a Script with Dependencies by ringer on Tuesday July 22, 2025 @11:24AM (#44648268)
Also, it doesn't work on Busybox either (e.g. on Alpine Linux).