diff --git a/crates/uv/src/commands/self_update.rs b/crates/uv/src/commands/self_update.rs index c65e003c9b83..3c0c1ffc485c 100644 --- a/crates/uv/src/commands/self_update.rs +++ b/crates/uv/src/commands/self_update.rs @@ -74,14 +74,24 @@ pub(crate) async fn self_update(printer: Printer) -> Result { // available version of uv. match updater.run().await { Ok(Some(result)) => { + let version_information = if let Some(old_version) = result.old_version { + format!( + "from {} to {}", + format!("v{old_version}").bold().white(), + format!("v{}", result.new_version).bold().white(), + ) + } else { + format!("to {}", format!("v{}", result.new_version).bold().white()) + }; + writeln!( printer.stderr(), "{}", format_args!( - "{}{} Upgraded uv to {}! {}", + "{}{} Upgraded uv {}! {}", "success".green().bold(), ":".bold(), - format!("v{}", result.new_version).bold().white(), + version_information, format!( "https://github.com/astral-sh/uv/releases/tag/{}", result.new_version_tag