mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
Get rid of Finally in DerivationBuilderImpl::unprepareBuild
Calling `reset` on this `std::optional` field of `DerivationBuilderImpl` is also what the (automatically created) destructor of `DerivationBuilderImpl` will do. We should be making sure that the derivation builder is cleaned up by the goal anyways, and if we do that, then this `Finally` is no longer needed.
This commit is contained in:
parent
8825bfa7fe
commit
76125f8eb1
2 changed files with 3 additions and 8 deletions
|
|
@ -484,14 +484,6 @@ bool DerivationBuilderImpl::prepareBuild()
|
|||
|
||||
SingleDrvOutputs DerivationBuilderImpl::unprepareBuild()
|
||||
{
|
||||
// FIXME: get rid of this, rely on RAII.
|
||||
Finally releaseBuildUser([&]() {
|
||||
/* Release the build user at the end of this function. We don't do
|
||||
it right away because we don't want another build grabbing this
|
||||
uid and then messing around with our output. */
|
||||
buildUser.reset();
|
||||
});
|
||||
|
||||
/* Since we got an EOF on the logger pipe, the builder is presumed
|
||||
to have terminated. In fact, the builder could also have
|
||||
simply have closed its end of the pipe, so just to be sure,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue