Skip to content

Commit

Permalink
dev: check version of bash on startup (#12204)
Browse files Browse the repository at this point in the history
If you are using an old version of bash our dev scripts fails in subtle
ways. For example we will detect file changes, but recompilation will
fail. This check ensures a dev is on version 5 of bash. If not it
fails the script and informs them how to upgrade.
  • Loading branch information
keegancsmith committed Jul 15, 2020
1 parent e6e0d4a commit e90e8fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dev/start.sh
Expand Up @@ -2,6 +2,13 @@

set -euf -o pipefail

if [[ ${BASH_VERSION:0:1} -lt 5 ]]; then
echo "Please upgrade bash to version 5. Currently on ${BASH_VERSION}."
echo
echo " brew install bash"
exit 1
fi

unset CDPATH
cd "$(dirname "${BASH_SOURCE[0]}")/.." # cd to repo root dir

Expand Down

0 comments on commit e90e8fa

Please sign in to comment.