File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env sh
22set -eu
33
4+ # Copied from arch() in ci/lib.sh.
5+ detect_arch () {
6+ case " $( uname -m) " in
7+ aarch64)
8+ echo arm64
9+ ;;
10+ x86_64 | amd64)
11+ echo amd64
12+ ;;
13+ * )
14+ # This will cause the download to fail, but is intentional
15+ uname -m
16+ ;;
17+ esac
18+ }
19+
20+ ARCH=" ${NPM_CONFIG_ARCH:- $(detect_arch)} "
21+
422main () {
523 # Grabs the major version of node from $npm_config_user_agent which looks like
624 # yarn/1.21.1 npm/? node/v14.2.0 darwin x64
@@ -25,7 +43,7 @@ main() {
2543 esac
2644
2745 OS=" $( uname | tr ' [:upper:]' ' [:lower:]' ) "
28- if curl -fsSL " https://storage.googleapis. com/coder- cloud-releases/ agent/latest/$OS /cloud-agent" -o ./lib/coder-cloud-agent; then
46+ if curl -fsSL " https://github. com/cdr/ cloud-agent/releases/ latest/download /cloud-agent- $OS - $ARCH " -o ./lib/coder-cloud-agent; then
2947 chmod +x ./lib/coder-cloud-agent
3048 else
3149 echo " Failed to download cloud agent; --link will not work"
You can’t perform that action at this time.
0 commit comments