fix(opencode): detect runtime config directory instead of hardcoding .claude#825
Open
Tibsfox wants to merge 1 commit intogsd-build:mainfrom
Open
fix(opencode): detect runtime config directory instead of hardcoding .claude#825Tibsfox wants to merge 1 commit intogsd-build:mainfrom
Tibsfox wants to merge 1 commit intogsd-build:mainfrom
Conversation
….claude Three files had hardcoded `.claude` paths that break OpenCode and Gemini installations where the config directory is `.config/opencode`, `.opencode`, or `.gemini` respectively. Changes: - hooks/gsd-check-update.js: add detectConfigDir() helper that checks all runtime directories for get-shit-done/VERSION, falling back to .claude. Used for cache dir, project VERSION, and global VERSION. - commands/gsd/reapply-patches.md: detect runtime directory for both global and local patch directories instead of hardcoding ~/.claude/ and ./.claude/ - workflows/update.md: detect runtime directory for local and global VERSION/marker files, and clear cache across all runtime directories Closes gsd-build#682 Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
Three files had hardcoded
.claudepaths that break OpenCode and Gemini installations where the config directory is.config/opencode,.opencode, or.gemini. While the installer templates most paths correctly at install time, these files either run at runtime (hooks) or contain bash pseudo-code that the model interprets directly (workflow/command markdown).This is a follow-up to the partial fix in v1.20.4 which addressed
gsd-statusline.jsand parts ofgsd-check-update.js, but left 3 files with hardcoded paths as noted by the original reporter.Changes
1.
hooks/gsd-check-update.js— Runtime detectionAdded
detectConfigDir()helper that probes forget-shit-done/VERSIONacross all runtime directories (.config/opencode,.opencode,.gemini,.claude), falling back to.claude. Used for:~/.claude/cache)./.claude/get-shit-done/VERSION)~/.claude/get-shit-done/VERSION)2.
commands/gsd/reapply-patches.md— Multi-runtime patch directoriesReplaced hardcoded
~/.claude/gsd-local-patchesand./.claude/gsd-local-patcheswith runtime detection loops that check all config directories for both global and local installs.3.
workflows/update.md— Install detection and cache cleanup.claudegsd-update-check.jsonacross all runtime directories instead of just.claudeVerification
npx get-shit-done-cc --opencode --globalgsd-check-update.jsshould find VERSION in.config/opencode/or.opencode//gsd:update— should detect install type correctly regardless of runtime/gsd:reapply-patches— should find patches in the correct runtime directoryCloses #682
🤖 Generated with Claude Code