aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorBruce Toll <4109762+tollb@users.noreply.github.com>2019-02-17 16:26:49 -0500
committerBruce Toll <4109762+tollb@users.noreply.github.com>2020-04-09 16:37:41 -0400
commit16a4864759a80aa03b9c87b8aeaf7a4c31c03e39 (patch)
treea3ddccb2510e35cb85db580d898cdcdf75820dd6 /src/libstore/build.cc
parent30d4618cc944a41c2ca202babd0be0da4a1cd9d2 (diff)
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.
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index 0febb8dfb..760663ac9 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -1680,6 +1680,7 @@ void DerivationGoal::buildDone()
}
if (buildMode == bmCheck) {
+ deleteTmpDir(true);
done(BuildResult::Built);
return;
}