Make sure we find the proper repo root with gemini#83
Merged
gtrrz-victor merged 2 commits intomainfrom Jan 21, 2026
Merged
Conversation
Entire-Checkpoint: 5de5697d60ab
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes the Gemini CLI agent implementation to use the repository root instead of the current working directory (CWD) when locating the .gemini configuration directory. This aligns the Gemini implementation with the Claude Code agent pattern and prevents issues when the CLI is run from a subdirectory of the repository.
Changes:
- Added
pathsimport tohooks.go - Updated four functions (
InstallHooks,UninstallHooks,AreHooksInstalled,DetectPresence) to usepaths.RepoRoot()with appropriate fallbacks - Added explanatory comments documenting the purpose and fallback behavior
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| cmd/entire/cli/agent/geminicli/hooks.go | Updated hook installation/management functions to use repo root; added paths import |
| cmd/entire/cli/agent/geminicli/gemini.go | Updated agent detection to use repo root instead of CWD |
gtrrz-victor
approved these changes
Jan 21, 2026
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.
This popped up when comparing claude code and gemini implementations. This has bitten us before, so make sure we not introduce new issues.