1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00

Delete scratch data for CA derivation that produced already-extant output

In the case where the store object doesn't exist, we do correctly move
(rather than copy) the scratch data into place. In this case, the
destination store object already exists, but we still want to clean up
after ourselves.
This commit is contained in:
John Ericson 2025-09-26 00:22:54 -04:00
parent 3bf1268ac6
commit 3c610df550

View file

@ -1712,6 +1712,8 @@ SingleDrvOutputs DerivationBuilderImpl::registerOutputs()
/* Path already exists because CA path produced by something
else. No moving needed. */
assert(newInfo.ca);
/* Can delete our scratch copy now. */
deletePath(actualPath);
} else {
auto destPath = store.toRealPath(finalDestPath);
deletePath(destPath);