Skip to content

Commit

Permalink
Fix: Don't exit on error while collecting data for _sys-info.log
Browse files Browse the repository at this point in the history
Change-Id: Ic3ed23b727b4663f01e52205641b23505518d3b9
Signed-off-by: Dave Wallace <[email protected]>
  • Loading branch information
dwallacelf committed Jul 22, 2021
1 parent 79af135 commit ebdc172
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shell/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ deploy_logs() {
env | grep -v -E "COOKIE|DOCKER|HUDSON|KEY|PASSWORD|SSH|TOKEN" | sort > "_build-enviroment-variables.log"

# Print system info before collecting logs
local set_opts="$-"
set +e # disable exit on errors
touch "_sys-info.log"
{
local sys_cmds
Expand All @@ -251,6 +253,7 @@ deploy_logs() {
fi
done
} 2>&1 | tee -a "_sys-info.log"
grep -q e <<< "$set_opts" && set -e # re-enable exit on errors

# Magic string used to trim console logs at the appropriate level during wget
MAGIC_STRING="-----END_OF_BUILD-----"
Expand Down

0 comments on commit ebdc172

Please sign in to comment.