@@ -91,8 +91,10 @@ pub(crate) use unix::{run_update, self_replace};
9191mod windows;
9292#[ cfg( windows) ]
9393pub use windows:: complete_windows_uninstall;
94+ #[ cfg( all( windows, any( test, feature = "test" ) ) ) ]
95+ pub ( crate ) use windows:: random_uuid;
9496#[ cfg( all( windows, feature = "test" ) ) ]
95- pub use windows:: { RegistryGuard , RegistryValueId , USER_PATH , get_path} ;
97+ pub use windows:: { RUSTUP_TEST_REGISTRY_UUID , RegistryValueId , USER_PATH , get_path} ;
9698#[ cfg( windows) ]
9799use windows:: { do_add_to_path, do_add_to_programs, do_remove_from_path, do_remove_from_programs} ;
98100#[ cfg( windows) ]
@@ -505,7 +507,7 @@ impl SelfUpdateMode {
505507 let setup_path = prepare_update ( dl_cfg) . await ?;
506508
507509 if let Some ( setup_path) = & setup_path {
508- return run_update ( setup_path) ;
510+ return run_update ( setup_path, dl_cfg . process ) ;
509511 } else {
510512 // Try again in case we emitted "tool `{}` is already installed" last time.
511513 install_proxies ( dl_cfg. process ) ?;
@@ -1019,7 +1021,7 @@ fn clean_cargo_home(no_modify_path: bool, process: &Process) -> Result<()> {
10191021 utils:: remove_file ( "rustup_bin" , & rustup_path) ?;
10201022
10211023 #[ cfg( windows) ]
1022- do_remove_from_programs ( ) ?;
1024+ do_remove_from_programs ( process ) ?;
10231025
10241026 let cargo_bin_display = cargo_bin. display ( ) ;
10251027 info ! ( "removing empty cargo bin directory `{cargo_bin_display}`" ) ;
@@ -1146,7 +1148,7 @@ pub(crate) async fn update(cfg: &Cfg<'_>) -> Result<ExitCode> {
11461148 PackageUpdate :: Rustup ,
11471149 Ok ( UpdateStatus :: Updated ( version) ) ,
11481150 ) ;
1149- return run_update ( & setup_path) ;
1151+ return run_update ( & setup_path, cfg . process ) ;
11501152 }
11511153 None => {
11521154 let _ = common:: show_channel_update (
0 commit comments