Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --dry-run support to uv self update #9829

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Dec 12, 2024

See commentary at #9828 (comment) regarding the limitations and future upstream changes needed.

❯ cargo build --features self-update
   Compiling uv v0.5.8 (/Users/zb/workspace/uv/crates/uv)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.28s
❯ cp ./target/debug/uv ~/.cargo/bin
❯ uv self update --dry-run
info: Checking for updates...
Nothing to do. You're on the latest version of uv (v0.5.8)
❯ uv self update --dry-run 0.5.7
info: Checking for updates...
Would update uv from v0.5.8 to v0.5.7
❯ vi ~/.config/uv/uv-receipt.json  # Edit the receipt to think its on an older version
❯ uv self update --dry-run
info: Checking for updates...
Would update uv from v0.5.8 to the latest version

@zanieb zanieb added the enhancement New feature or improvement to existing functionality label Dec 12, 2024
printer.stderr(),
"{}",
format_args!(
"Nothing to do. You're on the latest version of uv ({})",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might remove "Nothing to do".


/// Run without performing the update.
///
/// uv will report if it would upgrade or not.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might nix this second sentence personally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants