fix(install.sh): install from github when using --stable on macOS (#13216)

This commit is contained in:
Kayla Washburn-Love
2024-05-09 13:14:31 -06:00
committed by GitHub
parent 679099373b
commit e14f8fb64b
+9 -8
View File
@@ -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)