From 8c0f54015dc2527faa1a5ee843146e5ccc944bfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Domen=20Ko=C5=BEar?= Date: Mon, 4 Mar 2024 07:10:27 +0000 Subject: [PATCH] support devenv test --- src/libfetchers/git-utils.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libfetchers/git-utils.cc b/src/libfetchers/git-utils.cc index dacac38e8c4b..8bd4ec4c8963 100644 --- a/src/libfetchers/git-utils.cc +++ b/src/libfetchers/git-utils.cc @@ -311,6 +311,14 @@ struct GitRepoImpl : GitRepo, std::enable_shared_from_this 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());