top | item 43350635 (no title) marcthe12 | 11 months ago Do you need a wrapper script for scripts in the PATH or execve? I would usualy chmod+x the script but I am not sure here. discuss order hn newest Manfred|11 months ago If you want to make it work regardless of where uv is installed, you can use the following shebang line: #!/usr/bin/env uv run --script JimDabell|11 months ago Discussed here:> Using uv as your shebang line— https://news.ycombinator.com/item?id=42855258Since `env` doesn’t pass multiple arguments by default, the suggested line uses `-S`: #!/usr/bin/env -S uv run --script tetha|11 months ago Not at a laptop to try this right now, but shouldn't this be possible with the shebang? Something along the lines of: #!/home/tetha/Tools/uv run dfinninger|11 months ago Yes it is, I just converted my work scripts over this afternoon. #!/usr/bin/env uv run
Manfred|11 months ago If you want to make it work regardless of where uv is installed, you can use the following shebang line: #!/usr/bin/env uv run --script
JimDabell|11 months ago Discussed here:> Using uv as your shebang line— https://news.ycombinator.com/item?id=42855258Since `env` doesn’t pass multiple arguments by default, the suggested line uses `-S`: #!/usr/bin/env -S uv run --script
tetha|11 months ago Not at a laptop to try this right now, but shouldn't this be possible with the shebang? Something along the lines of: #!/home/tetha/Tools/uv run dfinninger|11 months ago Yes it is, I just converted my work scripts over this afternoon. #!/usr/bin/env uv run
dfinninger|11 months ago Yes it is, I just converted my work scripts over this afternoon. #!/usr/bin/env uv run
Manfred|11 months ago
JimDabell|11 months ago
> Using uv as your shebang line
— https://news.ycombinator.com/item?id=42855258
Since `env` doesn’t pass multiple arguments by default, the suggested line uses `-S`:
tetha|11 months ago
dfinninger|11 months ago