Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uv run file should execute file #6634

Closed
charliermarsh opened this issue Aug 26, 2024 · 3 comments
Closed

uv run file should execute file #6634

charliermarsh opened this issue Aug 26, 2024 · 3 comments
Labels
cli Related to the command line interface

Comments

@charliermarsh
Copy link
Member

charliermarsh commented Aug 26, 2024

Right now, you need uv run ./file, but I think uv run file should work too? Similar to how python file works.

See: #6360

@charliermarsh charliermarsh added the cli Related to the command line interface label Aug 26, 2024
@astral-sh astral-sh deleted a comment Aug 26, 2024
@charliermarsh
Copy link
Member Author

\cc @zanieb

@zanieb
Copy link
Member

zanieb commented Aug 26, 2024

I think no, per shell behavior:

❯ touch foo
❯ chmod +x foo
❯ foo
zsh: command not found: foo
❯ ./foo

I think we're doing the right thing by special-casing .py files.

@zanieb zanieb closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2024
@teroshan
Copy link

I was similarly confused by this, so I'll mention this here for future users searching issues for this:

As someone who used pipx, I was using pipx run standalone-script or pipx run standalone-script.py previously, and was looking to do the same with uv.

I also was using pipx run in my shebangs in a similar way, but other issues are open regarding this #6360

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

No branches or pull requests

3 participants