Skip to content

cli: walk up parent directories to find devenv.nix#2813

Open
domenkozar wants to merge 1 commit into
mainfrom
discover-devenv-nix-in-parents
Open

cli: walk up parent directories to find devenv.nix#2813
domenkozar wants to merge 1 commit into
mainfrom
discover-devenv-nix-in-parents

Conversation

@domenkozar
Copy link
Copy Markdown
Member

Summary

Test plan

  • Unit tests for find_project_root (marker in start dir, walks up to parent, returns none when missing)
  • Integration test tests/cli-subdir-discovery verifies discovery from one and two levels deep, plus negative case outside any project
  • CI green

🤖 Generated with Claude Code

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 12, 2026

Deploying devenv with  Cloudflare Pages  Cloudflare Pages

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

View logs

@domenkozar domenkozar force-pushed the discover-devenv-nix-in-parents branch from 9162d23 to 8cef84c Compare May 12, 2026 04:52
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 12, 2026

🔍 Suggested Reviewers

Based on git blame analysis of the changed lines, the following contributors have significant experience with the modified code:

  • @sandydoo - 100.0% of changed lines (3 lines)

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.
@domenkozar domenkozar force-pushed the discover-devenv-nix-in-parents branch from 8cef84c to 8955b26 Compare May 22, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow recursively finding the devenv.nix in the parent folders inside a monorepo

1 participant