mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Allow uv pip sync
to clear an environment with opt-in (#4517)
Closes https://github.com/astral-sh/uv/issues/4516 Open to some deliberation about the opt-in strategy here.
This commit is contained in:
parent
d9f389a58d
commit
2c0cb6e021
8 changed files with 116 additions and 7 deletions
|
@ -826,6 +826,13 @@ pub struct PipSyncArgs {
|
|||
#[arg(long, conflicts_with = "no_build")]
|
||||
pub only_binary: Option<Vec<PackageNameSpecifier>>,
|
||||
|
||||
/// Allow sync of empty requirements, which will clear the environment of all packages.
|
||||
#[arg(long, overrides_with("no_allow_empty_requirements"))]
|
||||
pub allow_empty_requirements: bool,
|
||||
|
||||
#[arg(long, overrides_with("allow_empty_requirements"))]
|
||||
pub no_allow_empty_requirements: bool,
|
||||
|
||||
/// The minimum Python version that should be supported by the requirements (e.g.,
|
||||
/// `3.7` or `3.7.9`).
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue