xbps-src: exit properly if mktemp(1) fails, not from its subshell.
Thanks @huglovefan
This commit is contained in:
parent
8614cca7df
commit
7b7d7c13a1
10 changed files with 12 additions and 12 deletions
|
@ -131,7 +131,7 @@ fi
|
|||
# the bootstrap pkgs from scratch.
|
||||
if [ -z "$CHROOT_READY" -a "$PKGNAME" = "base-files" ]; then
|
||||
msg_normal "Installing $PKGNAME into masterdir...\n"
|
||||
_log=$(mktemp || exit 1)
|
||||
_log=$(mktemp) || exit 1
|
||||
XBPS_ARCH=$XBPS_MACHINE $XBPS_INSTALL_CMD -yf $PKGNAME >${_log} 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_red "Failed to install $PKGNAME into masterdir, see below for errors:\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue