Skip to content

Commit

Permalink
Add -o pipefail to bash scripts
Browse files Browse the repository at this point in the history
This could cause the script to exit successfully even if running
hammerdbcli failed, because hammerdbcli output was piped into `tee`.
  • Loading branch information
JelteF committed Dec 14, 2021
1 parent 96a024f commit ff809eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build-and-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set -u
set -e
# echo commands
set -x
# fail if a command that is piped fails
set -o pipefail

if [ $# -eq 4 ] ; then
version=$1
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set -u
set -e
# echo commands
set -x
# fail if a command that is piped fails
set -o pipefail

if [ $# -eq 4 ] ; then
version=$1
Expand Down
2 changes: 2 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ set -u
set -e
# echo commands
set -x
# fail if a command that is piped fails
set -o pipefail

CH_THREAD_COUNT=1
RAMPUP_TIME=3
Expand Down

0 comments on commit ff809eb

Please sign in to comment.