Skip to content

Commit 6cf1f80

Browse files
committed
fix(self-update): replace some #[cfg(not(unix))] usages with #[cfg(windows)]
1 parent abd63d8 commit 6cf1f80

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/cli/self_update/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
33
use std::sync::Mutex;
44

5-
#[cfg(not(unix))]
5+
#[cfg(windows)]
66
use winreg::{
77
enums::{HKEY_CURRENT_USER, KEY_READ, KEY_WRITE},
88
RegKey, RegValue,
99
};
1010

11-
#[cfg(not(unix))]
11+
#[cfg(windows)]
1212
pub fn get_path() -> std::io::Result<Option<RegValue>> {
1313
let root = RegKey::predef(HKEY_CURRENT_USER);
1414
let environment = root
@@ -21,7 +21,7 @@ pub fn get_path() -> std::io::Result<Option<RegValue>> {
2121
}
2222
}
2323

24-
#[cfg(not(unix))]
24+
#[cfg(windows)]
2525
fn restore_path(p: Option<RegValue>) {
2626
let root = RegKey::predef(HKEY_CURRENT_USER);
2727
let environment = root

0 commit comments

Comments
 (0)