From f6b8ea6c67a33a4029018da6961ca0ff9293b786 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 16 Jan 2025 16:09:41 -0800 Subject: [PATCH] Update install-standalone script (#3179) * Fix escaping in install-standalone.sh * 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 --------- Co-authored-by: Dan Massey Co-authored-by: lonnen --- install-standalone.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install-standalone.sh b/install-standalone.sh index 5920d96ff0..cf2b565d7c 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 @@ -43,6 +38,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