fix: resolve repo root for initialization when started from subdirectory#665
Open
mvanhorn wants to merge 1 commit intoentireio:mainfrom
Open
fix: resolve repo root for initialization when started from subdirectory#665mvanhorn wants to merge 1 commit intoentireio:mainfrom
mvanhorn wants to merge 1 commit intoentireio:mainfrom
Conversation
When `entire enable` is run from a subdirectory, change to the repo root before proceeding. This ensures agent hooks (e.g., .gemini/settings.json, .claude/settings.json) are created at the correct location and can be found by the agent regardless of CWD. Prints a note when operating from a subdirectory so the user knows the repo root is being used. Fixes entireio#559 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Fixes #559
When
entire enableis run from a subdirectory (e.g.,cd repo/frontend && entire enable), the agent hook config files (.gemini/settings.json,.claude/settings.json) must be created at the repo root for agents to find them. While internal path resolution viapaths.AbsPath()already usesgit rev-parse --show-toplevel, some agent config lookups are CWD-relative. This fix explicitly changes to the repo root before the enable flow begins.Changes
entire enableis run from a subdirectory (CWD != repo root)Testing
entire enablefrom a subdirectory within a git repo and verify it succeeds.entire/settings.jsonand agent config files are created at the repo root, not the subdirectoryentire enablefrom the repo root and verify no extra note is printedThis contribution was developed with AI assistance (Claude Code).