From a6d67161904ba7d4b95b24e34149fea2cc813da3 Mon Sep 17 00:00:00 2001 From: rami3l Date: Sun, 14 Apr 2024 16:00:54 +0800 Subject: [PATCH] feat(self-update): improve error messages on Windows --- src/cli/self_update/windows.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/self_update/windows.rs b/src/cli/self_update/windows.rs index a7a20df72f1..07a321619e0 100644 --- a/src/cli/self_update/windows.rs +++ b/src/cli/self_update/windows.rs @@ -510,7 +510,7 @@ fn rustup_uninstall_reg_key() -> Result { pub(crate) fn do_update_programs_display_version(version: &str) -> Result<()> { rustup_uninstall_reg_key()? .set_value("DisplayVersion", &version) - .context("Failed to set display version") + .context("Failed to set `DisplayVersion`") } pub(crate) fn do_add_to_programs() -> Result<()> { @@ -542,9 +542,9 @@ pub(crate) fn do_add_to_programs() -> Result<()> { }; key.set_raw_value("UninstallString", ®_value) - .context("Failed to set uninstall string")?; + .context("Failed to set `UninstallString`")?; key.set_value("DisplayName", &"Rustup: the Rust toolchain installer") - .context("Failed to set display name")?; + .context("Failed to set `DisplayName`")?; do_update_programs_display_version(env!("CARGO_PKG_VERSION"))?; Ok(())