From a7c7d28863401d6751b1811802aee7d84e472a0b Mon Sep 17 00:00:00 2001 From: lonnen Date: Sun, 15 Jan 2023 19:13:21 -0800 Subject: [PATCH] move /usr/local/bin check after platform check `/usr/local/bin` is an os-specific path that must exist on your $PATH. This change moves the check confirming that to _after_ the OS and platform checks to allow for it to bail earlier on windows with a more helpful error message --- install-standalone.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install-standalone.sh b/install-standalone.sh index c238804cd3..380eeeb316 100644 --- a/install-standalone.sh +++ b/install-standalone.sh @@ -17,11 +17,6 @@ echoerr() { echo "\$@" 1>&2; } - if [[ ! ":\$PATH:" == *":/usr/local/bin:"* ]]; then - echoerr "Your path is missing /usr/local/bin, you need to add this to use this installer." - exit 1 - fi - if [ "\$(uname)" == "Darwin" ]; then OS=darwin elif [ "\$(expr substr \$(uname -s) 1 5)" == "Linux" ]; then @@ -41,6 +36,11 @@ exit 1 fi + if [[ ! ":\$PATH:" == *":/usr/local/bin:"* ]]; then + echoerr "Your path is missing /usr/local/bin, you need to add this to use this installer." + exit 1 + fi + mkdir -p /usr/local/lib cd /usr/local/lib rm -rf heroku