Skip to content

Commit 506c71c

Browse files
committed
Use an absolute path in test_process_output_fail_to_start
This test is designed to ensure that running a non-existent executable results in a correct error message (FileNotFound in this case of this test). However, if you try to run an executable that doesn't exist, and that requires searching through the $PATH, and one of the $PATH components is not readable, then a PermissionDenied error will be returned, instead of FileNotFound.
1 parent 5675f28 commit 506c71c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ mod tests {
360360
trapped_io_error = true;
361361
assert_eq!(e.kind, FileNotFound);
362362
}).inside(|| -> Option<run::ProcessOutput> {
363-
run::process_output("no-binary-by-this-name-should-exist", [])
363+
run::process_output("/no-binary-by-this-name-should-exist", [])
364364
});
365365
assert!(trapped_io_error);
366366
assert!(opt_outp.is_none());

0 commit comments

Comments
 (0)