mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-29 16:13:47 +00:00
Better missing self update feature (#8337)
This commit is contained in:
parent
d53d580221
commit
e26eed10e4
4 changed files with 158 additions and 18 deletions
|
@ -408,7 +408,6 @@ pub enum Commands {
|
|||
Cache(CacheNamespace),
|
||||
/// Manage the uv executable.
|
||||
#[command(name = "self")]
|
||||
#[cfg(feature = "self-update")]
|
||||
Self_(SelfNamespace),
|
||||
/// Clear the cache, removing all entries or those linked to specific packages.
|
||||
#[command(hide = true)]
|
||||
|
@ -449,21 +448,18 @@ pub struct HelpArgs {
|
|||
}
|
||||
|
||||
#[derive(Args)]
|
||||
#[cfg(feature = "self-update")]
|
||||
pub struct SelfNamespace {
|
||||
#[command(subcommand)]
|
||||
pub command: SelfCommand,
|
||||
}
|
||||
|
||||
#[derive(Subcommand)]
|
||||
#[cfg(feature = "self-update")]
|
||||
pub enum SelfCommand {
|
||||
/// Update uv.
|
||||
Update(SelfUpdateArgs),
|
||||
}
|
||||
|
||||
#[derive(Args, Debug)]
|
||||
#[cfg(feature = "self-update")]
|
||||
pub struct SelfUpdateArgs {
|
||||
/// Update to the specified version. If not provided, uv will update to the latest version.
|
||||
pub target_version: Option<String>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue