Skip to content

Prefer uv's binary's version when checking if it's up to date #13840

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

Merged
merged 1 commit into from
Jun 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions crates/uv/src/commands/self_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ pub(crate) async fn self_update(
return Ok(ExitStatus::Error);
};

// If we know what our version is, ignore whatever the receipt thinks it is!
// This makes us behave better if someone manually installs a random version of uv
// in a way that doesn't update the receipt.
if let Ok(version) = env!("CARGO_PKG_VERSION").parse() {
// This is best-effort, it's fine if it fails (also it can't actually fail)
let _ = updater.set_current_version(version);
}

// Ensure the receipt is for the current binary. If it's not, then the user likely has multiple
// uv binaries installed, and the current binary was _not_ installed via the standalone
// installation scripts.
Expand Down
Loading