handle an existing shebang in uv init --script (#14141)
Closes https://github.com/astral-sh/uv/issues/14085.
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user