You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let name = CString::new("RustupInstall").unwrap();
32
36
let hr = WcaInitialize(hInstall, name.as_ptr());
33
37
// For deferred custom actions, all data must be passed through the `CustomActionData` property
34
38
let custom_action_data = get_property("CustomActionData");
35
39
// TODO: use rustup_utils::cargo_home() or pass through CustomActionData
36
40
let path = PathBuf::from(::std::env::var_os("USERPROFILE").unwrap()).join(".rustup-test");
37
-
let exe_installed = path.join("bin").join("rustup.exe").exists();
41
+
let bin_path = path.join("bin");
42
+
let rustup_path = bin_path.join("rustup.exe");
43
+
let exe_installed = rustup_path.exists();
38
44
log(&format!("Hello World from RustupInstall, confirming that rustup.exe has been installed: {}! CustomActionData: {}", exe_installed, custom_action_data));
let name = CString::new("RustupUninstall").unwrap();
46
57
let hr = WcaInitialize(hInstall, name.as_ptr());
47
58
// For deferred custom actions, all data must be passed through the `CustomActionData` property
48
59
let custom_action_data = get_property("CustomActionData");
49
60
// TODO: use rustup_utils::cargo_home() or pass through CustomActionData
50
61
let path = PathBuf::from(::std::env::var_os("USERPROFILE").unwrap()).join(".rustup-test");
51
-
let exe_installed = path.join("bin").join("rustup.exe").exists();
52
-
log(&format!("Hello World from RustupUninstall, confirming that rustup.exe has not yet been removed: {}! CustomActionData: {}", exe_installed, custom_action_data));
62
+
let exe_deleted = !path.join("bin").join("rustup.exe").exists();
63
+
log(&format!("Hello World from RustupUninstall, confirming that rustup.exe has been deleted: {}! CustomActionData: {}", exe_deleted, custom_action_data));
0 commit comments