[pacman-dev] [PATCH 09/10] makepkg: Clear ERR trap before trying to restore it

Jan Alexander Steffens (heftig) jan.steffens at gmail.com
Thu May 31 16:24:54 UTC 2018


$restoretrap is empty if the trap was not set. This caused the trap
handler to remain and override later exit codes.
---
 scripts/makepkg.sh.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index ed0ceaec..3a3f4c30 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -432,6 +432,7 @@ run_function_safe() {
 
 	run_function "$1"
 
+	trap - ERR
 	eval "$restoretrap"
 	eval "$restoreset"
 	eval "$restoreshopt"
-- 
2.17.0


More information about the pacman-dev mailing list