diff --git a/install.sh b/install.sh index 50c3c85a8f..e5d0ca6fab 100755 --- a/install.sh +++ b/install.sh @@ -373,14 +373,6 @@ main() { ARCH=${ARCH:-$(arch)} TERRAFORM_ARCH=${TERRAFORM_ARCH:-$(terraform_arch)} - # We can't reasonably support installing specific versions of Coder through - # Homebrew, so if we're on macOS and the `--version` flag was set, we should - # "detect" standalone to be the appropriate installation method. This check - # needs to occur before we set `VERSION` to a default of the latest release. - if [ "$OS" = "darwin" ] && [ "${VERSION-}" ]; then - METHOD=standalone - fi - # If we've been provided a flag which is specific to the standalone installation # method, we should "detect" standalone to be the appropriate installation method. # This check needs to occur before we set these variables with defaults. @@ -395,6 +387,15 @@ main() { exit 1 fi + # We can't reasonably support installing specific versions of Coder through + # Homebrew, so if we're on macOS and the `--version` flag or the `--stable` + # flag (our tap follows mainline) was set, we should "detect" standalone to + # be the appropriate installation method. This check needs to occur before we + # set `VERSION` to a default of the latest release. + if [ "$OS" = "darwin" ] && { [ "${VERSION-}" ] || [ "${STABLE}" = 1 ]; }; then + METHOD=standalone + fi + # These are used by the various install_* functions that make use of GitHub # releases in order to download and unpack the right release. CACHE_DIR=$(echo_cache_dir)