* When keeping the temporary build directory (-K), change the owner
back to the Nix account.
This commit is contained in:
parent
e24d0201c2
commit
6833e8bbe8
1 changed files with 4 additions and 1 deletions
|
@ -1698,10 +1698,13 @@ void DerivationGoal::initChild()
|
|||
void DerivationGoal::deleteTmpDir(bool force)
|
||||
{
|
||||
if (tmpDir != "") {
|
||||
if (keepFailed && !force)
|
||||
if (keepFailed && !force) {
|
||||
printMsg(lvlError,
|
||||
format("builder for `%1%' failed; keeping build directory `%2%'")
|
||||
% drvPath % tmpDir);
|
||||
if (buildUser.enabled() && !amPrivileged())
|
||||
getOwnership(tmpDir);
|
||||
}
|
||||
else
|
||||
deletePathWrapped(tmpDir);
|
||||
tmpDir = "";
|
||||
|
|
Loading…
Reference in a new issue