fix(sisyphus-agent): handle OpenCode installer failure with pinned version fallback
Replace retry loop with intelligent fallback strategy: - Try default installer first (better for version discovery) - On failure, fallback to pinned version 1.0.204 - Handle corrupted downloads with direct fallback install This addresses the sisyphus-agent workflow failure where OpenCode's installer failed with 'Failed to fetch version information' error. 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
19
.github/workflows/sisyphus-agent.yml
vendored
19
.github/workflows/sisyphus-agent.yml
vendored
@@ -86,14 +86,19 @@ jobs:
|
|||||||
|
|
||||||
# Install OpenCode (skip if cached)
|
# Install OpenCode (skip if cached)
|
||||||
if ! command -v opencode &>/dev/null; then
|
if ! command -v opencode &>/dev/null; then
|
||||||
for i in 1 2 3; do
|
echo "Installing OpenCode..."
|
||||||
echo "Attempt $i: Installing OpenCode..."
|
curl -fsSL https://opencode.ai/install -o /tmp/opencode-install.sh
|
||||||
curl -fsSL https://opencode.ai/install -o /tmp/opencode-install.sh
|
|
||||||
if file /tmp/opencode-install.sh | grep -q "shell script\|text"; then
|
# Try default installer first, fallback to pinned version if it fails
|
||||||
bash /tmp/opencode-install.sh && break
|
if file /tmp/opencode-install.sh | grep -q "shell script\|text"; then
|
||||||
|
if ! bash /tmp/opencode-install.sh 2>&1; then
|
||||||
|
echo "Default installer failed, trying with pinned version..."
|
||||||
|
bash /tmp/opencode-install.sh --version 1.0.204
|
||||||
fi
|
fi
|
||||||
echo "Download corrupted, retrying in 5s..."
|
else
|
||||||
done
|
echo "Download corrupted, trying direct install with pinned version..."
|
||||||
|
bash <(curl -fsSL https://opencode.ai/install) --version 1.0.204
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
opencode --version
|
opencode --version
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user