fix(install): resolve non-.md context paths like paths.json#252
Open
darrenhinde wants to merge 2 commits intomainfrom
Open
fix(install): resolve non-.md context paths like paths.json#252darrenhinde wants to merge 2 commits intomainfrom
darrenhinde wants to merge 2 commits intomainfrom
Conversation
) resolve_component_path() was appending .md to all slash-containing context IDs, so context:core/config/paths.json was looked up as paths.json.md and returned empty, triggering the 'Could not find path' warning on install. Now tries the .md path first (preserving existing behaviour for all markdown context files), then falls back to the bare path for non-markdown files.
Replace local arr=($var) with read -ra arr <<< "$var" in install-context.sh to satisfy ShellCheck SC2206 and unblock CI.
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
resolve_component_path()ininstall.shwas unconditionally appending.mdto any context ID containing a/, socontext:core/config/paths.jsonwas looked up as.opencode/context/core/config/paths.json.md— a path that doesn't exist.⚠ Could not find path for context:core/config/paths.jsonand count the component as failed, even though the file is present in both the repo and the registry..mdpath first (preserving existing behaviour for all markdown context files), then fall back to the bare path for non-markdown files (e.g..json).Root Cause
Fix
Testing
Verified with
jqdirectly againstregistry.json:.mdappended) → empty (broken)".opencode/context/core/config/paths.json"✅.mdcontext (core/config/navigation) → still resolves correctly via first branch ✅Closes #251