mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Allow the package spec to be passed positionally in uv tool install
(#4564)
Moves `--from` to a hidden argument — we allow it still but we validate that it is compatible with whatever is passed to `uv tool install <package>`. The positional package can now be a full specification, allowing things like `uv tool install black==24.2.0`.
This commit is contained in:
parent
f7fb5a4061
commit
7c3ad62544
5 changed files with 192 additions and 25 deletions
|
@ -1908,13 +1908,13 @@ pub struct ToolRunArgs {
|
|||
#[derive(Args)]
|
||||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolInstallArgs {
|
||||
/// The command to install.
|
||||
pub name: String,
|
||||
/// The package to install commands from.
|
||||
pub package: String,
|
||||
|
||||
/// Use the given package to provide the command.
|
||||
/// The package to install commands from.
|
||||
///
|
||||
/// By default, the package name is assumed to match the command name.
|
||||
#[arg(long)]
|
||||
/// This option is provided for parity with `uv tool run`, but is redundant with `package`.
|
||||
#[arg(long, hide = true)]
|
||||
pub from: Option<String>,
|
||||
|
||||
/// Include the following extra requirements.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue