Update PEP 723 lockfile in uv add --script (#10145)

## Summary

`uv add --script main.py anyio` will now update the lockfile, _if_ it
already exists. (If no such lockfile exists, the behavior is unchanged.)
This commit is contained in:
Charlie Marsh 2025-01-08 16:19:12 -05:00 committed by GitHub
parent e22b728e3f
commit 31b2d3f988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 585 additions and 121 deletions

View file

@ -3257,7 +3257,12 @@ pub struct AddArgs {
/// a new one will be created and added to the script. When executed via `uv run`,
/// uv will create a temporary environment for the script with all inline
/// dependencies installed.
#[arg(long, conflicts_with = "dev", conflicts_with = "optional")]
#[arg(
long,
conflicts_with = "dev",
conflicts_with = "optional",
conflicts_with = "package"
)]
pub script: Option<PathBuf>,
/// The Python interpreter to use for resolving and syncing.