cli: walk up parent directories to find devenv.nix#2813
Open
domenkozar wants to merge 1 commit into
Open
Conversation
Deploying devenv with
|
| Latest commit: |
8955b26
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://106d14ee.devenv.pages.dev |
| Branch Preview URL: | https://discover-devenv-nix-in-paren.devenv.pages.dev |
9162d23 to
8cef84c
Compare
Contributor
🔍 Suggested ReviewersBased on git blame analysis of the changed lines, the following contributors have significant experience with the modified code:
Please consider reviewing this PR as you have authored significant portions of the code being modified. Your expertise would be valuable! 🙏 This comment was automatically generated by git-blame-auto-reviewer Last updated: 2026-05-22T21:25:19.274Z |
When devenv.nix is missing in cwd, walk up parent directories before erroring. This lets commands like `devenv shell` work from any subdirectory of a project, fixing the friction when editors open terminals in nested folders. Discovery is skipped when --from or -O is used, since those construct the project from explicit inputs. Fixes #2232.
8cef84c to
8955b26
Compare
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
devenv.nixis missing in cwd, walk up parent directories before erroring. Commands likedevenv shellnow work from any subdirectory of a project — fixes the friction when editors open terminals in nested folders.--fromor-Ois used, since those construct the project from explicit inputs.Test plan
find_project_root(marker in start dir, walks up to parent, returns none when missing)tests/cli-subdir-discoveryverifies discovery from one and two levels deep, plus negative case outside any project🤖 Generated with Claude Code