mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
makepkg: unset errexit when sourcing /etc/profile
This is a fix for a bash3 specific bug, where a file sourced by /etc/profile would exit non-zero and make its way back up to makepkg, forcing it to exit after package installation. Along with unsetting the ERR handler, temporarily unset errexit to avoid this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
This commit is contained in:
parent
7f1235ccbc
commit
c736a12e86
@ -474,11 +474,13 @@ handle_deps() {
|
||||
fi
|
||||
|
||||
# we might need the new system environment
|
||||
# avoid triggering the ERR trap
|
||||
# avoid triggering the ERR trap and exiting
|
||||
set +e
|
||||
local restoretrap=$(trap -p ERR)
|
||||
trap - ERR
|
||||
source /etc/profile &>/dev/null
|
||||
eval $restoretrap
|
||||
set -e
|
||||
|
||||
return $R_DEPS_SATISFIED
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user