handle an existing shebang in uv init --script (#14141)

Closes https://github.com/astral-sh/uv/issues/14085.
This commit is contained in:
Jack O'Connor
2025-06-19 14:47:22 -07:00
committed by GitHub
parent c3e4b63806
commit cc8d5a9215
6 changed files with 88 additions and 8 deletions
+2
View File
@@ -241,10 +241,12 @@ Declaration of dependencies is also supported in this context, for example:
```python title="example"
#!/usr/bin/env -S uv run --script
#
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx"]
# ///
import httpx
print(httpx.get("https://example.com"))