Skip to content

Commit

Permalink
feat(self-update): improve error messages on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rami3l committed Apr 14, 2024
1 parent d411b70 commit a6d6716
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/self_update/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ fn rustup_uninstall_reg_key() -> Result<RegKey> {
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<()> {
Expand Down Expand Up @@ -542,9 +542,9 @@ pub(crate) fn do_add_to_programs() -> Result<()> {
};

key.set_raw_value("UninstallString", &reg_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(())
Expand Down

0 comments on commit a6d6716

Please sign in to comment.