1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-14 04:51:05 +01:00

Write a destructor for DerivationBuilderImpl

This allows `DerivationBuildingGoal` to know less.
This commit is contained in:
John Ericson 2025-08-28 12:40:55 -04:00
parent 557bbe969e
commit 49da508f46
3 changed files with 33 additions and 31 deletions

View file

@ -59,18 +59,8 @@ DerivationBuildingGoal::~DerivationBuildingGoal()
ignoreExceptionInDestructor();
}
#ifndef _WIN32 // TODO enable `DerivationBuilder` on Windows
if (builder) {
try {
builder->stopDaemon();
} catch (...) {
ignoreExceptionInDestructor();
}
try {
builder->cleanupBuild(false);
} catch (...) {
ignoreExceptionInDestructor();
}
}
if (builder)
builder.reset();
#endif
try {
closeLogFile();