Skip to content

Commit a863ef9

Browse files
committed
run-ubuntu-chroot: Don't rm -r across mounts
Avoid destroying the host's /dev if unmounting virtual file systems in the chroot failed.
1 parent 550e5b3 commit a863ef9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/run-ubuntu-chroot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ CHROOT_TAR="$CACHE/$(basename $CHROOT_URL)"
2424

2525
# prepare chroot
2626
BUILDDIR=$(mktemp -d)
27-
trap "sudo rm -rf $BUILDDIR" EXIT INT QUIT PIPE
27+
trap "sudo rm --one-file-system -rf $BUILDDIR" EXIT INT QUIT PIPE
2828
sudo tar -C "$BUILDDIR" -xf "$CHROOT_TAR"
2929
CHROOT="$BUILDDIR/chroot-autobuild"
3030
sudo cp /etc/resolv.conf "$CHROOT/etc/resolv.conf"

0 commit comments

Comments
 (0)