From 39d9a42c359df5dbf37c5000af8192f14a280b94 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 8 Feb 2022 10:40:11 -0800 Subject: [PATCH] [Fix] `install.sh`: error out if the install instructions are not followed --- install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.sh b/install.sh index 359d2de..2bf513a 100755 --- a/install.sh +++ b/install.sh @@ -10,6 +10,12 @@ nvm_echo() { 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() { GREP_OPTIONS='' command grep "$@" }