[PR #11670] fix(opencode): give OPENCODE_CONFIG_CONTENT proper priority for setting config based on docs #13890

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/11670

State: closed
Merged: Yes


What does this PR do?

Fixes #11628

The OPENCODE_CONFIG_CONTENT env used to set the opencode config in the docs is said to have the highest priority, but it was not, as its set before the opencode.json files inside the .opencode directory for the project.

So the fix was to move the logic mergiing configs from the env lower to give it higher prior, and also added better comments to help the next developer understand whats going on and the flow of the priorities with a link to the docs.

How did you verify your code works?

Tested with a simple repo with a theme set in the .opencode/opencode.json and then passing in a OPENCODE_CONFIG_CONTENT opencode with a different theme and that new forced one is set, as it should.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11670 **State:** closed **Merged:** Yes --- ### What does this PR do? Fixes #11628 The `OPENCODE_CONFIG_CONTENT` env used to set the opencode config in the docs is said to have the highest priority, but it was not, as its set before the opencode.json files inside the `.opencode` directory for the project. So the fix was to move the logic mergiing configs from the env lower to give it higher prior, and also added better comments to help the next developer understand whats going on and the flow of the priorities with a link to the docs. ### How did you verify your code works? Tested with a simple repo with a theme set in the `.opencode/opencode.json` and then passing in a `OPENCODE_CONFIG_CONTENT` opencode with a different theme and that new forced one is set, as it should.
yindo added the pull-request label 2026-02-16 18:18:43 -05:00
yindo closed this issue 2026-02-16 18:18:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13890