From bfd6844d41351f6621cbce819cf305d65d30ae9b Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Wed, 21 Jul 2021 22:57:10 -0400 Subject: [PATCH] common/hooks/post-install/04-create-xbps-metadata-scripts.sh: fix return code of failed trigger runs --- .../hooks/post-install/04-create-xbps-metadata-scripts.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh index 8bb86c4487a5..406a6fc233f7 100644 --- a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh +++ b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh @@ -327,7 +327,8 @@ _EOF continue fi printf "\t\${TRIGGERSDIR}/$f run $j \${PKGNAME} \${VERSION} \${UPDATE} \${CONF_FILE}\n" >> $tmpf - printf "\t[ \$? -ne 0 ] && exit \$?\n" >> $tmpf + printf "\tret=\$?\n" >> $tmpf + printf "\t[ \$ret -ne 0 ] && exit \$ret\n" >> $tmpf done done printf "\t;;\n" >> $tmpf @@ -339,7 +340,8 @@ _EOF continue fi printf "\t\${TRIGGERSDIR}/$f run $j \${PKGNAME} \${VERSION} \${UPDATE} \${CONF_FILE}\n" >> $tmpf - printf "\t[ \$? -ne 0 ] && exit \$?\n" >> $tmpf + printf "\tret=\$?\n" >> $tmpf + printf "\t[ \$ret -ne 0 ] && exit \$ret\n" >> $tmpf done done printf "\t;;\n" >> $tmpf