Backport #864 from trunk: 1.2
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Jul 26 15:16:40 2008 +0000 (2008-07-26)
branch1.2
changeset 733f1257533021a
parent 732 683fe8c2851f
child 739 8ebf5ea601d8
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(+)
scripts/functions
     1.1 --- a/scripts/functions	Sat Jul 26 15:15:48 2008 +0000
     1.2 +++ b/scripts/functions	Sat Jul 26 15:16:40 2008 +0000
     1.3 @@ -5,6 +5,8 @@
     1.4  # Prepare the fault handler
     1.5  CT_OnError() {
     1.6      ret=$?
     1.7 +    # Bail out early in subshell, the upper level shell will act accordingly.
     1.8 +    [ ${BASH_SUBSHELL} -eq 0 ] || exit $ret
     1.9      CT_DoLog ERROR "Build failed in step '${CT_STEP_MESSAGE[${CT_STEP_COUNT}]}'"
    1.10      for((step=(CT_STEP_COUNT-1); step>1; step--)); do
    1.11          CT_DoLog ERROR "      called in step '${CT_STEP_MESSAGE[${step}]}'"