Repository navigation
fix(opencode): pass VERSION to bash instead of curl in install pipe - #815
Merged
Merged
Conversation
Member
|
Thanks for the fix. |
35C4n0r
requested changes
Mar 26, 2026
Co-authored-by: 35C4n0r <70096901+35C4n0r@users.noreply.github.com>
Collaborator
|
@megheaiulian can you do a git pull and run |
Collaborator
|
@megheaiulian workflows fail, can you run |
35C4n0r
approved these changes
Mar 27, 2026
35C4n0r
left a comment
Collaborator
There was a problem hiding this comment.
@megheaiulian thanks for the contribution. LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
registry/coder-labs/modules/opencode/scripts/install.sh, line 42)Bug: The install command was:
VERSIONwas set as an environment variable prefix tocurl(the left side of the pipe), so thebashprocess on the right side of the pipe never received it. In a shell pipeline, each command runs in its own subprocess, so env var prefixes only apply to the immediately following command. This caused the installer script to always install the latest version instead of the pinned version specified by the user.Fix: Move
VERSIONto prefixbashinstead ofcurl:Now the
VERSIONvariable is correctly available to the install script executed bybash.Test plan
opencode_versionto a specific version (e.g.,0.1.0) and verify that version is installed instead of latestopencode_versiontolatestand verify the latest version is still installed (this code path is unchanged)opencode --versionoutput matches the requested version after install