File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,14 @@ pub(crate) async fn self_update(
63
63
return Ok ( ExitStatus :: Error ) ;
64
64
} ;
65
65
66
+ // If we know what our version is, ignore whatever the receipt thinks it is!
67
+ // This makes us behave better if someone manually installs a random version of uv
68
+ // in a way that doesn't update the receipt.
69
+ if let Ok ( version) = env ! ( "CARGO_PKG_VERSION" ) . parse ( ) {
70
+ // This is best-effort, it's fine if it fails (also it can't actually fail)
71
+ let _ = updater. set_current_version ( version) ;
72
+ }
73
+
66
74
// Ensure the receipt is for the current binary. If it's not, then the user likely has multiple
67
75
// uv binaries installed, and the current binary was _not_ installed via the standalone
68
76
// installation scripts.
You can’t perform that action at this time.
0 commit comments