fix setup/update script printing errors message 2 times

In case of failures the scripts will print the error message two times.
That is because the first time is printed due to an ERR trap while the
second one is triggered by EXIT trap.

refs DE-698
flag = none

test-plan:
- Build passes
- setup/update scripts works locally
- force the scripts to fail and check if only one error message is
printed

Change-Id: Iece00e5d9a8ccc35a859ee13c340b0fd40697ad8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/265728
Reviewed-by: James Butters <jbutters@instructure.com>
QA-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Product-Review: Andrea Cirulli <andrea.cirulli@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
This commit is contained in:
Andrea Cirulli 2021-05-25 15:30:57 -05:00
parent 8fe35bd6dd
commit 94fe2c07c7
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ function trap_result {
echo_console_and_log " /o\ Something went wrong. Check ${LOG} for details."
_canvas_lms_telemetry_report_status $exit_code
fi
trap - EXIT
exit ${exit_code}
}