mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
LocalStore::addValidPath(): Throw error when the CA assertion is wrong
Closes #2133.
This commit is contained in:
parent
53ec5ac69f
commit
80a7b16593
1 changed files with 2 additions and 1 deletions
|
@ -581,7 +581,8 @@ void LocalStore::checkDerivationOutputs(const Path & drvPath, const Derivation &
|
|||
uint64_t LocalStore::addValidPath(State & state,
|
||||
const ValidPathInfo & info, bool checkOutputs)
|
||||
{
|
||||
assert(info.ca == "" || info.isContentAddressed(*this));
|
||||
if (info.ca != "" && !info.isContentAddressed(*this))
|
||||
throw Error("cannot add path '%s' to the Nix store because it claims to be content-addressed but isn't", info.path);
|
||||
|
||||
state.stmtRegisterValidPath.use()
|
||||
(info.path)
|
||||
|
|
Loading…
Reference in a new issue