[Fix] `install.sh`: error out if the install instructions are not followed

Jordan Harband 2022-02-08 10:40:11 -08:00
parent 2c0c34f10e
commit 39d9a42c35
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 6 additions and 0 deletions

View File

@ -10,6 +10,12 @@ nvm_echo() {
command printf %s\\n "$*" 2>/dev/null command printf %s\\n "$*" 2>/dev/null
} }
if [ -z "${BASH_VERSION}" ] || [ -n "${ZSH_VERSION}" ]; then
# shellcheck disable=SC2016
nvm_echo >&2 'Error: the install instructions explicitly say to pipe the install script to `bash`; please follow them'
exit 1
fi
nvm_grep() { nvm_grep() {
GREP_OPTIONS='' command grep "$@" GREP_OPTIONS='' command grep "$@"
} }