[PR #1500] [MERGED] handle the optional v in upgrade command when using curl #9952

Closed
opened 2026-02-16 18:14:26 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1500
Author: @CodinCat
Created: 8/1/2025
Status: Merged
Merged: 8/1/2025
Merged by: @thdxr

Base: devHead: handle-v-in-version


📝 Commits (1)

  • 1f4dbab handle the optional v in upgrade command when using curl

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/opencode/src/cli/cmd/upgrade.ts (+1 -1)

📄 Description

the example in documentation is opencode upgrade v0.1.48, and the description of the CLI command is

version to upgrade to, for ex '0.1.48' or 'v0.1.48'

but when the method is curl, running opencode upgrade v0.3.110 will fail because the v is already hardcoded in the install script:

url="https://github.com/sst/opencode/releases/download/v${requested_version}/$filename"

this should fix the optional v prefix (/^v/ only matches when the v is the first character).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1500 **Author:** [@CodinCat](https://github.com/CodinCat) **Created:** 8/1/2025 **Status:** ✅ Merged **Merged:** 8/1/2025 **Merged by:** [@thdxr](https://github.com/thdxr) **Base:** `dev` ← **Head:** `handle-v-in-version` --- ### 📝 Commits (1) - [`1f4dbab`](https://github.com/anomalyco/opencode/commit/1f4dbab03d557f0b99b0933325b132716df60e66) handle the optional `v` in upgrade command when using curl ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/opencode/src/cli/cmd/upgrade.ts` (+1 -1) </details> ### 📄 Description the example in [documentation](https://opencode.ai/docs/cli/#upgrade) is `opencode upgrade v0.1.48`, and the description of the CLI command is ``` version to upgrade to, for ex '0.1.48' or 'v0.1.48' ``` but when the method is curl, running `opencode upgrade v0.3.110` will fail because the `v` is already hardcoded in the install script: ```bash url="https://github.com/sst/opencode/releases/download/v${requested_version}/$filename" ``` this should fix the optional `v` prefix (`/^v/` only matches when the `v` is the first character). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:26 -05:00
yindo closed this issue 2026-02-16 18:14:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9952