Skip to content

Commit 993644c

Browse files
Merge pull request #7803 from jplatte/chroot
Fix chroot trying to change into non-existent directory
2 parents 06bae0d + 25ce0ba commit 993644c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/uu/chroot/src/chroot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ fn enter_chroot(root: &Path, skip_chdir: bool) -> UResult<()> {
448448

449449
if err == 0 {
450450
if !skip_chdir {
451-
std::env::set_current_dir(root).unwrap();
451+
std::env::set_current_dir("/").unwrap();
452452
}
453453
Ok(())
454454
} else {

0 commit comments

Comments
 (0)