From 4378db760e82b09305d6076fbf8e92c3e2cc4737 Mon Sep 17 00:00:00 2001 From: Ahmed Abushagur Date: Thu, 19 Feb 2026 13:52:26 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20opencode=20download=20URL=20=E2=80=94=20?= =?UTF-8?q?map=20x86=5F64=20to=20x64,=20drop=20darwin=E2=86=92mac=20rename?= =?UTF-8?q?=20(#1485)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release assets use x64 not x86_64 (opencode-linux-x64.tar.gz) and darwin not mac (opencode-darwin-arm64.tar.gz). The arch mapping only handled aarch64→arm64 but missed x86_64→x64, causing 404 on all x86_64 servers. Co-authored-by: Claude Opus 4.6 --- shared/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/common.sh b/shared/common.sh index 6273bb46..679e0044 100644 --- a/shared/common.sh +++ b/shared/common.sh @@ -3549,7 +3549,7 @@ ensure_ssh_key_with_provider() { # layer. The upstream installer's "curl -#" flag also interferes in non-TTY # environments. opencode_install_cmd() { - printf '%s' 'OC_ARCH=$(uname -m); if [ "$OC_ARCH" = "aarch64" ]; then OC_ARCH=arm64; fi; OC_OS=$(uname -s | tr A-Z a-z); if [ "$OC_OS" = "darwin" ]; then OC_OS=mac; fi; mkdir -p /tmp/opencode-install "$HOME/.opencode/bin" && curl -fsSL -o /tmp/opencode-install/oc.tar.gz "https://github.com/anomalyco/opencode/releases/latest/download/opencode-${OC_OS}-${OC_ARCH}.tar.gz" && tar xzf /tmp/opencode-install/oc.tar.gz -C /tmp/opencode-install && mv /tmp/opencode-install/opencode "$HOME/.opencode/bin/" && rm -rf /tmp/opencode-install && grep -q ".opencode/bin" "$HOME/.bashrc" 2>/dev/null || echo '"'"'export PATH="$HOME/.opencode/bin:$PATH"'"'"' >> "$HOME/.bashrc"; grep -q ".opencode/bin" "$HOME/.zshrc" 2>/dev/null || echo '"'"'export PATH="$HOME/.opencode/bin:$PATH"'"'"' >> "$HOME/.zshrc" 2>/dev/null; export PATH="$HOME/.opencode/bin:$PATH"' + printf '%s' 'OC_ARCH=$(uname -m); case "$OC_ARCH" in aarch64) OC_ARCH=arm64;; x86_64) OC_ARCH=x64;; esac; OC_OS=$(uname -s | tr A-Z a-z); mkdir -p /tmp/opencode-install "$HOME/.opencode/bin" && curl -fsSL -o /tmp/opencode-install/oc.tar.gz "https://github.com/anomalyco/opencode/releases/latest/download/opencode-${OC_OS}-${OC_ARCH}.tar.gz" && tar xzf /tmp/opencode-install/oc.tar.gz -C /tmp/opencode-install && mv /tmp/opencode-install/opencode "$HOME/.opencode/bin/" && rm -rf /tmp/opencode-install && grep -q ".opencode/bin" "$HOME/.bashrc" 2>/dev/null || echo '"'"'export PATH="$HOME/.opencode/bin:$PATH"'"'"' >> "$HOME/.bashrc"; grep -q ".opencode/bin" "$HOME/.zshrc" 2>/dev/null || echo '"'"'export PATH="$HOME/.opencode/bin:$PATH"'"'"' >> "$HOME/.zshrc" 2>/dev/null; export PATH="$HOME/.opencode/bin:$PATH"' } # ============================================================