You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flakes] add flakes.nix to git only if we are in a git repo (#539)
## Summary
This PR looks if the devbox project is in a git repository before adding
the
flake.nix to a "fake git repository". With this PR, `devbox` with flakes
will no longer require `git` as a hard dependency.
When I tested with a simple flakes playground project, I observed:
1. if not in a git repository, then flakes.nix can be used by `nix
develop`.
2. if in a git repository, then `nix develop` fails if flakes.nix is not
tracked.
3. Surprisingly, if in a mercurial repository, then `nix develop` still
works if flakes.nix is not tracked by mercurial. Surprising because docs
online hint that flakes supports both git and mercurial, but I guess not
enforced for this requirement.
## How was it tested?
Ran `DEVBOX_FEATURE_FLAKES=1 devbox shell` in devbox projects:
1. in a git repo
2. outside a git repo
0 commit comments