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