Skip to content

Commit

Permalink
support devenv test
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Mar 4, 2024
1 parent d61bd1c commit 8c0f540
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libfetchers/git-utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,14 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this<GitRepoImpl>
info.files.insert(CanonPath((cwd / ".devenv.flake.nix").string()).removePrefix(CanonPath(path.string())).rel());
info.files.insert(CanonPath((cwd / ".devenv/flake.json").string()).removePrefix(CanonPath(path.string())).rel());
info.files.insert(CanonPath((cwd / ".devenv/devenv.json").string()).removePrefix(CanonPath(path.string())).rel());
// support devenv test
for (const auto & entry : fs::directory_iterator(cwd)) {
if (entry.path().filename().string().find(".devenv.") == 0 && fs::is_directory(entry.path())) {
// add flake.json and devenv.json
info.files.insert(CanonPath((entry.path() / "flake.json").string()).removePrefix(CanonPath(path.string())).rel());
info.files.insert(CanonPath((entry.path() / "devenv.json").string()).removePrefix(CanonPath(path.string())).rel());
}
}
}
if (pathExists(cwd / "devenv.local.nix")) {
info.files.insert(CanonPath((cwd / "devenv.local.nix").string()).removePrefix(CanonPath(path.string())).rel());
Expand Down

0 comments on commit 8c0f540

Please sign in to comment.