Skip to content

Commit

Permalink
Merge #70250
Browse files Browse the repository at this point in the history
70250: roachtest: require bash v4+ for roachstress.sh r=erikgrinaker a=tbg

The bash bundled with OSX doesn't even support `read -i` so we're
better off encouraging folks to use a version that isn't over a
decade old.

Release note: None


Co-authored-by: Tobias Grieger <[email protected]>
  • Loading branch information
craig[bot] and tbg committed Sep 15, 2021
2 parents a6c2841 + ff9389d commit 5add02d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cmd/roachtest/roachstress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ set -euo pipefail
# It's best practice to invoke this script with "caffeinate" on OSX and/or linux
# to avoid computer going to standby.

if [ -z "${BASH_VERSINFO}" ] || [ -z "${BASH_VERSINFO[0]}" ] || [ "${BASH_VERSINFO[0]}" -lt 4 ]; then
echo "This script requires Bash version >= 4"
echo "On OSX, 'brew install bash' should do the trick."
exit 1
fi

# Read user input.
if [ ! -v TEST ]; then read -r -e -p "Test regexp: " TEST; fi
Expand Down

0 comments on commit 5add02d

Please sign in to comment.