Revert "stdenv: runPhase returns status"

This commit is contained in:
Martin Weinelt
2024-12-04 02:18:53 +01:00
committed by GitHub
parent 331228b648
commit 41d4a66bba
+2 -6
View File
@@ -1694,7 +1694,6 @@ showPhaseFooter() {
runPhase() {
local retval=0
local curPhase="$*"
if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then return; fi
if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then return; fi
@@ -1713,9 +1712,8 @@ runPhase() {
startTime=$(date +"%s")
# Evaluate the variable named $curPhase if it exists, otherwise the
# function named $curPhase. Trap errors in subshell to set non-zero retval.
trap 'retval=1; trap - ERR' ERR
eval "set -o errtrace; ${!curPhase:-$curPhase}"
# function named $curPhase.
eval "${!curPhase:-$curPhase}"
endTime=$(date +"%s")
@@ -1727,8 +1725,6 @@ runPhase() {
cd -- "${sourceRoot:-.}"
fi
return $retval
}