# HG changeset patch # User "Yann E. MORIN" # Date 1217085400 0 # Node ID f1257533021a3d688816a939a03da08ad59111ae # Parent 683fe8c2851fe9e3f7164475cdbb6c749fbdc63b Backport #864 from trunk: Limit printing the error message only in the top-level shell. /branches/1.2/scripts/functions | 2 2 0 0 ++ 1 file changed, 2 insertions(+) diff -r 683fe8c2851f -r f1257533021a scripts/functions --- a/scripts/functions Sat Jul 26 15:15:48 2008 +0000 +++ b/scripts/functions Sat Jul 26 15:16:40 2008 +0000 @@ -5,6 +5,8 @@ # Prepare the fault handler CT_OnError() { ret=$? + # Bail out early in subshell, the upper level shell will act accordingly. + [ ${BASH_SUBSHELL} -eq 0 ] || exit $ret CT_DoLog ERROR "Build failed in step '${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}'" for((step=(CT_STEP_COUNT-1); step>1; step--)); do CT_DoLog ERROR " called in step '${CT_STEP_MESSAGE[${step}]}'"