[PR #11316] fix(opencode): fix issues with glob behaviour for config instructions… #13737

Open
opened 2026-02-16 18:18:34 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


… and changes to support testing global instructions

What does this PR do?

Changes to instuctions.ts to correct path loading behviour so the full range of glob patterns work.

Previously ** globs would get parse out by path.dirname (actually resulting in a file not found error which was silent).

I suspect this was probably related to #8892, and maybe some other issues around instructions being ignored.

Fixes #11317

How did you verify your code works?

Added tests to instructions.test.ts to cover cases for globs and global config instructions which seemed to not previously covered.

It's worth noting, whilst digging around the tests and code, getting the tests to ignore my actual homedir was very challenging do to the inconsistent use of Global.path.home, Global.path.config and os.homedir().

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11316 **State:** open **Merged:** No --- … and changes to support testing global instructions ### What does this PR do? Changes to `instuctions.ts` to correct path loading behviour so the full range of glob patterns work. Previously `**` globs would get parse out by `path.dirname` (actually resulting in a file not found error which was silent). I suspect this was probably related to #8892, and maybe some other issues around instructions being ignored. Fixes #11317 ### How did you verify your code works? Added tests to `instructions.test.ts` to cover cases for globs and global config instructions which seemed to not previously covered. It's worth noting, whilst digging around the tests and code, getting the tests to ignore my actual homedir was very challenging do to the inconsistent use of `Global.path.home`, `Global.path.config` and `os.homedir()`.
yindo added the pull-request label 2026-02-16 18:18:34 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13737