Skip to content

Conversation

@asottile
Copy link
Member

@asottile asottile commented Mar 6, 2025

Reverts #503

resolves #512

@asottile asottile merged commit d7518a7 into main Mar 8, 2025
6 checks passed
@asottile asottile deleted the revert-503-uv-interpreter branch March 8, 2025 15:53
@OJFord
Copy link

OJFord commented Jul 3, 2025

This is unfortunate - could we instead match uv run --script or uv run python to keep #503 behaviour?

It's only because of the 'bash' in #512 (uv run bash essentially) that it's not a python script; I'm sure the more common case will be people using uv run --script for isolated python scripts with dependencies like:

#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["boto3"]
# ///
import boto3

assert boto3.client("s3")

@OJFord
Copy link

OJFord commented Jul 3, 2025

Workaround I think is to use env -S python -m uv run --script, but that's a bit silly and non-obviously important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Shebang #!/usr/bin/env -S uv run bash incorrectly detected as python

3 participants