uv
c072c9ad - Return error when running uvx with a .py script (#11623)

Commit
284 days ago
Return error when running uvx with a .py script (#11623) If we see `uvx script.py`, we exit early, giving a hint to use `uv run script.py` if the script exists. If it does not exist, we suggest running `uv run` with a normalized package name. This PR includes a snapshot test for each of these scenarios. An alternative approach would be to wait until we encounter an error, and then add the hint. But if there happens to be a malicious package called `script-py`, this would be run unintentionally (a point raised by @zanieb). Closes #10784 --------- Co-authored-by: Zanie Blue <contact@zanie.dev>
Author
Parents
Loading