Skip to content

Commit aa4c8ce

Browse files
committed
Skip permissions test when running as root
1 parent 39cbb71 commit aa4c8ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/transport/local.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ mod test {
371371
use std::fs;
372372
use std::os::unix::prelude::PermissionsExt;
373373

374+
if nix::unistd::Uid::effective().is_root() {
375+
println!("Skipping permissions test when running as root");
376+
return;
377+
}
378+
374379
let temp = assert_fs::TempDir::new().unwrap();
375380
let transport = Transport::local(temp.path());
376381
temp.child("file").touch().unwrap();

0 commit comments

Comments
 (0)