fix: use absolute paths for gsd-tools.cjs in all install types (#820)#960
Open
RyanAlberts wants to merge 1 commit intogsd-build:mainfrom
Open
fix: use absolute paths for gsd-tools.cjs in all install types (#820)#960RyanAlberts wants to merge 1 commit intogsd-build:mainfrom
RyanAlberts wants to merge 1 commit intogsd-build:mainfrom
Conversation
…uild#820) Local installs wrote $HOME/.claude/get-shit-done/bin/gsd-tools.cjs into workflow files, which breaks when GSD is installed outside $HOME (e.g. external drives, symlinked projects) and when spawned subagents have an empty $HOME environment variable. - pathPrefix now always resolves to an absolute path via path.resolve() - All $HOME/.claude/ replacements use the absolute prefix directly - Codex installer uses absolute path for get-shit-done prefix - Removed unused toHomePrefix() function Tested: 535/535 existing tests pass, verified local install produces correct absolute paths, verified global install unchanged, verified empty $HOME scenario resolves correctly. Closes gsd-build#820 Made-with: Cursor
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
bin/install.jsnow always resolves to an absolute path viapath.resolve(targetDir), eliminating$HOMEand~references in installed workflow/agent/reference files$HOME/.claude/replacement sites use the absolute prefix directly instead oftoHomePrefix()(which re-introduced$HOME)get-shit-doneprefixtoHomePrefix()functionProblem
When GSD is installed locally (
.claude/get-shit-done/), all 35+ workflow and reference files hardcode:node "$HOME/.claude/get-shit-done/bin/gsd-tools.cjs" ...This breaks in two scenarios:
$HOME— project on external drive, symlinked path, or Docker volume where$HOME/.claude/get-shit-done/doesn't exist$HOME— Opus and other models spawn agents where$HOMEis unset, causing the path to resolve to/.claude/get-shit-done/bin/gsd-tools.cjsFix
Instead of converting paths back to
$HOME-relative form, the installer now writes fully resolved absolute paths into all installed files:Test plan
$HOMEreferences ingsd-tools.cjspaths$HOMEsimulation: verifiedgsd-tools.cjsresolves correctly withHOME="".claudepaths in non-Claude runtimes (installer's built-in verification passes)Closes #820
Related: #842, #852, #870
Made with Cursor