We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2351ff commit dd24914Copy full SHA for dd24914
1 file changed
tests/config.rs
@@ -74,12 +74,18 @@ install_dir = "/legacy/bin"
74
)
75
.unwrap();
76
77
- // Mock home directory
+ // Mock home directory - use USERPROFILE on Windows, HOME on Unix
78
+ #[cfg(windows)]
79
+ env::set_var("USERPROFILE", home);
80
+ #[cfg(not(windows))]
81
env::set_var("HOME", home);
82
83
let config = Config::load_from_legacy().unwrap().unwrap();
84
assert_eq!(config.install_dir, PathBuf::from("/legacy/bin"));
85
86
87
+ env::remove_var("USERPROFILE");
88
89
env::remove_var("HOME");
90
}
91
0 commit comments