Require at least one target for toolchain uninstalls (#4820)

Closes https://github.com/astral-sh/uv/issues/4816.
This commit is contained in:
Charlie Marsh 2024-07-04 18:31:40 -04:00 committed by GitHub
parent a13ab43a0d
commit 3fa09a3972
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2063,10 +2063,10 @@ pub struct PythonListArgs {
#[derive(Args)] #[derive(Args)]
#[allow(clippy::struct_excessive_bools)] #[allow(clippy::struct_excessive_bools)]
pub struct PythonInstallArgs { pub struct PythonInstallArgs {
/// The Python versions to install. /// The Python version(s) to install.
/// ///
/// If not provided, the requested Python version(s) will be read from the `.python-versions` /// If not provided, the requested Python version(s) will be read from the `.python-versions`
/// or `.python-version` files. If neither file is present, uv will check if it has /// or `.python-version` files. If neither file is present, uv will check if it has
/// installed any Python versions. If not, it will install the latest stable version of Python. /// installed any Python versions. If not, it will install the latest stable version of Python.
pub targets: Vec<String>, pub targets: Vec<String>,
@ -2078,7 +2078,8 @@ pub struct PythonInstallArgs {
#[derive(Args)] #[derive(Args)]
#[allow(clippy::struct_excessive_bools)] #[allow(clippy::struct_excessive_bools)]
pub struct PythonUninstallArgs { pub struct PythonUninstallArgs {
/// The Python versions to uninstall. /// The Python version(s) to uninstall.
#[arg(required = true)]
pub targets: Vec<String>, pub targets: Vec<String>,
} }