1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

Add Mercurial tests

This commit is contained in:
Eelco Dolstra 2020-01-27 13:45:49 +01:00
parent cc22cf662b
commit 5046233b5a
3 changed files with 69 additions and 6 deletions

View file

@ -509,7 +509,14 @@ LockedFlake lockFlake(
if (settings.warnDirty)
warn("will not write lock file of flake '%s' because it has a mutable input", topRef);
} else {
newLockFile.write(*sourcePath + (topRef.subdir == "" ? "" : "/" + topRef.subdir) + "/flake.lock");
auto path = *sourcePath + (topRef.subdir == "" ? "" : "/" + topRef.subdir) + "/flake.lock";
if (pathExists(path))
warn("updating lock file '%s'", path);
else
warn("creating lock file '%s'", path);
newLockFile.write(path);
// FIXME: rewriting the lockfile changed the
// top-level repo, so we should re-read it.