mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 10:58:28 +00:00
Add support for specifying name@version
in uv tool run
(#4572)
Instead of requiring `uv tool run --from package==version command` we support `uv tool run command@version` shorthand.
This commit is contained in:
parent
857b3cc777
commit
cb580d1a5d
3 changed files with 144 additions and 8 deletions
|
@ -1861,6 +1861,13 @@ pub enum ToolCommand {
|
|||
#[allow(clippy::struct_excessive_bools)]
|
||||
pub struct ToolRunArgs {
|
||||
/// The command to run.
|
||||
///
|
||||
/// By default, the package to install is assumed to match the command name.
|
||||
///
|
||||
/// The name of the command can include an exact version in the format `<package>@<version>`.
|
||||
///
|
||||
/// If more complex version specification is desired or if the command is provided by a different
|
||||
/// package, use `--from`.
|
||||
#[command(subcommand)]
|
||||
pub command: ExternalCommand,
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue