Merge pull request #734 from bjornfor/hash-mismatch-message

Clarify error message for hash mismatches (again)
This commit is contained in:
Eelco Dolstra 2015-12-08 19:53:48 +01:00
commit 7431932b29

View file

@ -2736,8 +2736,8 @@ void DerivationGoal::registerOutputs()
Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
if (h != h2)
throw BuildError(
format("Nix expects output path %1% to have %2% hash %3%, instead it has %4%")
% path % i.second.hashAlgo % printHash16or32(h) % printHash16or32(h2));
format("output path %1% has %2% hash %3% when %4% was expected")
% path % i.second.hashAlgo % printHash16or32(h2) % printHash16or32(h));
}
/* Get rid of all weird permissions. This also checks that