feat: auto-discover project root by walking up to find .rr.yaml#155
Merged
rileyhilliard merged 1 commit intomainfrom Jan 27, 2026
Merged
feat: auto-discover project root by walking up to find .rr.yaml#155rileyhilliard merged 1 commit intomainfrom
rileyhilliard merged 1 commit intomainfrom
Conversation
When running rr from a subdirectory of the project, commands now work correctly by: 1. Walking up the directory tree to find .rr.yaml (similar to git, npm, cargo) 2. Using the project root (where .rr.yaml is located) as the working directory for sync operations instead of the current directory The config discovery already had parent walking logic, but it had a bug where it stopped at the git root BEFORE checking if .rr.yaml exists there. This fix reorders the check to find config at the git root. Fixes #154 Co-Authored-By: Claude Opus 4.5 <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
.rr.yamlat the git root when running from subdirectories.rr.yamlis located) as the working directory for sync operationsProjectRootfield toResolvedConfigto track where config was foundProblem
When running
rrfrom a subdirectory of the project (e.g.,myapp/src/components/instead ofmyapp/), commands fail or sync incorrectly because rr uses the current working directory as the project root.Solution
Walk up the directory tree to find
.rr.yaml, similar to how other tools work:gitfinds.gitdirectorynpm/bunfindpackage.jsoncargofindsCargo.tomlThe config discovery code already had parent walking logic, but it had a bug where it stopped at the git root BEFORE checking if
.rr.yamlexists there. This fix reorders the check.Test plan
ProjectRootbeing populated correctlysetupWorkDirusing project rootFixes #154
🤖 Generated with Claude Code