mirror of
https://github.com/nushell/nushell.git
synced 2025-02-22 21:41:26 +01:00
attempts to allow the test to work when run as root (#5601)
This commit is contained in:
parent
a3a9571dac
commit
7c63ce15d8
@ -259,9 +259,20 @@ fn fails_with_ls_to_dir_without_permission() {
|
||||
chmod 000 dir_a; ls dir_a
|
||||
"#
|
||||
));
|
||||
assert!(actual
|
||||
.err
|
||||
.contains("The permissions of 0 do not allow access for this user"));
|
||||
|
||||
let check_not_root = nu!(
|
||||
cwd: dirs.test(), pipeline(
|
||||
r#"
|
||||
id -u
|
||||
"#
|
||||
));
|
||||
|
||||
assert!(
|
||||
actual
|
||||
.err
|
||||
.contains("The permissions of 0 do not allow access for this user")
|
||||
|| check_not_root.out == "0"
|
||||
);
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user