1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 08:11:47 +02:00

Delete temporary directory on successful build

With --check and the --keep-failed (-K) flag, the temporary directory
was being retained regardless of whether the build was successful and
reproducible.  This removes the temporary directory, as expected, on
a reproducible check build.

Added tests to verify that temporary build directories are not
retained unnecessarily, particularly when using --check with
--keep-failed.
This commit is contained in:
Bruce Toll 2019-02-17 16:26:49 -05:00
parent 30d4618cc9
commit 16a4864759
3 changed files with 84 additions and 2 deletions

View file

@ -1680,6 +1680,7 @@ void DerivationGoal::buildDone()
}
if (buildMode == bmCheck) {
deleteTmpDir(true);
done(BuildResult::Built);
return;
}