We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
#[cfg(not(unix))]
#[cfg(windows)]
1 parent abd63d8 commit 6cf1f80Copy full SHA for 6cf1f80
src/cli/self_update/test.rs
@@ -2,13 +2,13 @@
2
3
use std::sync::Mutex;
4
5
-#[cfg(not(unix))]
+#[cfg(windows)]
6
use winreg::{
7
enums::{HKEY_CURRENT_USER, KEY_READ, KEY_WRITE},
8
RegKey, RegValue,
9
};
10
11
12
pub fn get_path() -> std::io::Result<Option<RegValue>> {
13
let root = RegKey::predef(HKEY_CURRENT_USER);
14
let environment = root
@@ -21,7 +21,7 @@ pub fn get_path() -> std::io::Result<Option<RegValue>> {
21
}
22
23
24
25
fn restore_path(p: Option<RegValue>) {
26
27
0 commit comments