We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3153584 commit 68c03cdCopy full SHA for 68c03cd
library/std/src/sys/windows/process/tests.rs
@@ -186,8 +186,15 @@ fn windows_exe_resolver() {
186
let temp = tmpdir();
187
let mut exe_path = temp.path().to_owned();
188
exe_path.push("exists.exe");
189
- symlink("<DOES NOT EXIST>".as_ref(), &exe_path).unwrap();
190
191
// A broken symlink should still be resolved.
192
- assert!(resolve_exe(OsStr::new("exists.exe"), empty_paths, Some(temp.path().as_ref())).is_ok());
+ // Skip this check if not in CI and creating symlinks isn't possible.
+ let is_ci = env::var("CI").is_ok();
193
+ let result = symlink("<DOES NOT EXIST>".as_ref(), &exe_path);
194
+ if is_ci || result.is_ok() {
195
+ result.unwrap();
196
+ assert!(
197
+ resolve_exe(OsStr::new("exists.exe"), empty_paths, Some(temp.path().as_ref())).is_ok()
198
+ );
199
+ }
200
}
0 commit comments