Exit on all errors in bash scripts when possible

Except for the collect-test-info script, the other bash scripts should
just exit on error.

Change-Id: Ia68bef56edd7edec14f678155220b6e4e15e57f6
This commit is contained in:
Riccardo Pittau 2021-02-09 12:05:11 +01:00
parent 5360d0e869
commit 422bafd6ea
4 changed files with 6 additions and 6 deletions

View File

@ -2,8 +2,7 @@
# Note(TheJulia): We should proceed with attempting to collect information # Note(TheJulia): We should proceed with attempting to collect information
# even if a command fails, and as such set -e should not be present. # even if a command fails, and as such set -e should not be present.
set -ux set -uxo pipefail
set -o pipefail
# Note(TheJulia): If there is a workspace variable, we want to utilize that as # Note(TheJulia): If there is a workspace variable, we want to utilize that as
# the preference of where to put logs # the preference of where to put logs

View File

@ -1,5 +1,6 @@
#!/bin/bash #!/bin/bash
set -eu
set -euxo pipefail
. $(dirname $0)/install-deps.sh . $(dirname $0)/install-deps.sh
# NOTE(pas-ha) the above exports some useful variables like # NOTE(pas-ha) the above exports some useful variables like

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
set -eu set -euxo pipefail
if [[ "${BIFROST_TRACE:-}" == true ]]; then if [[ "${BIFROST_TRACE:-}" == true ]]; then
set -x set -x

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
set -eux set -euxo pipefail
set -o pipefail
export PYTHONUNBUFFERED=1 export PYTHONUNBUFFERED=1
SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)" SCRIPT_HOME="$(cd "$(dirname "$0")" && pwd)"
BIFROST_HOME=$SCRIPT_HOME/.. BIFROST_HOME=$SCRIPT_HOME/..