diff --git a/xbps-src/xbps-src.sh.in b/xbps-src/xbps-src.sh.in index 721603ded0..28cbe14a32 100644 --- a/xbps-src/xbps-src.sh.in +++ b/xbps-src/xbps-src.sh.in @@ -39,7 +39,8 @@ sighandler_exit() { # Always unmount in case we failed before! if [ -z "$in_chroot" ]; then - env MASTERDIR="${_MASTERDIR}" \ + cd ${_MASTERDIR} && \ + env MASTERDIR="${_MASTERDIR}" \ @@XBPS_INSTALL_LIBEXECDIR@@/xbps-src-chroot-helper umount fi [ -n "$1" ] && exit $1