Skip to content

fix(opencode): fallback to sh for curl upgrade#30499

Merged
nexxeln merged 4 commits into
anomalyco:devfrom
ulises-jeremias:fix/30353-upgrade-fallback-sh
Jun 3, 2026
Merged

fix(opencode): fallback to sh for curl upgrade#30499
nexxeln merged 4 commits into
anomalyco:devfrom
ulises-jeremias:fix/30353-upgrade-fallback-sh

Conversation

@ulises-jeremias

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #30353

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Installation.upgrade for the curl method was executing the install script with bash unconditionally. On Alpine, bash is often unavailable, so opencode upgrade fails.

This change detects shell availability before script execution:

  • run bash --version
  • if unavailable, fall back to sh

The installer script now runs with the detected shell.

How did you verify your code works?

From packages/opencode:

  • bun test test/installation/installation.test.ts
  • bun typecheck

Added and updated installation tests to cover:

  • curl upgrade error path with shell detection
  • bash missing fallback to sh

Screenshots / recordings

N/A (non-UI change)

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@nexxeln nexxeln merged commit 01cc475 into anomalyco:dev Jun 3, 2026
8 checks passed
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 3, 2026
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
(cherry picked from commit 01cc475)
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Co-authored-by: Shoubhit Dash <shoubhit2005@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade fails on Alpine because of bash dependency

2 participants