Commit df49725a authored by Mattia Rizzolo's avatar Mattia Rizzolo

handle failing scripts

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent 8dd02906
......@@ -27,9 +27,8 @@ run_script() (
# Execute the deploy script
# Capture the output and print it only if the script fails
"$script" > "$output" 2>&1
ret=$?
if [[ "$ret" -ne 0 ]]; then
"$script" > "$output" 2>&1 || ret=$?
if [[ "${ret-0}" -ne 0 ]]; then
echo "Deploy script $(basename "${script}") failed!"
echo "Return code: $?"
echo "Script output"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment