@@ -373,14 +373,6 @@ main() {
373
373
ARCH=${ARCH:- $(arch)}
374
374
TERRAFORM_ARCH=${TERRAFORM_ARCH:- $(terraform_arch)}
375
375
376
- # We can't reasonably support installing specific versions of Coder through
377
- # Homebrew, so if we're on macOS and the `--version` flag was set, we should
378
- # "detect" standalone to be the appropriate installation method. This check
379
- # needs to occur before we set `VERSION` to a default of the latest release.
380
- if [ " $OS " = " darwin" ] && [ " ${VERSION-} " ]; then
381
- METHOD=standalone
382
- fi
383
-
384
376
# If we've been provided a flag which is specific to the standalone installation
385
377
# method, we should "detect" standalone to be the appropriate installation method.
386
378
# This check needs to occur before we set these variables with defaults.
@@ -395,6 +387,15 @@ main() {
395
387
exit 1
396
388
fi
397
389
390
+ # We can't reasonably support installing specific versions of Coder through
391
+ # Homebrew, so if we're on macOS and the `--version` flag or the `--stable`
392
+ # flag (our tap follows mainline) was set, we should "detect" standalone to
393
+ # be the appropriate installation method. This check needs to occur before we
394
+ # set `VERSION` to a default of the latest release.
395
+ if [ " $OS " = " darwin" ] && { [ " ${VERSION-} " ] || [ " ${STABLE} " = 1 ]; }; then
396
+ METHOD=standalone
397
+ fi
398
+
398
399
# These are used by the various install_* functions that make use of GitHub
399
400
# releases in order to download and unpack the right release.
400
401
CACHE_DIR=$( echo_cache_dir)
0 commit comments