mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
Clarify error message for hash mismatches (again)
This is arguably nitpicky, but I think this new formulation is even clearer. My thinking is that it's easier to comprehend when the calculated hash value is displayed close to the output path. (I think it is somewhat similar to eliminating double negatives in logic statements.) The formulation is inspired / copied from the OpenEmbedded build tool, bitbake.
This commit is contained in:
parent
d1e3bf01bc
commit
65bd82d42a
1 changed files with 2 additions and 2 deletions
|
@ -2736,8 +2736,8 @@ void DerivationGoal::registerOutputs()
|
||||||
Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
|
Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
|
||||||
if (h != h2)
|
if (h != h2)
|
||||||
throw BuildError(
|
throw BuildError(
|
||||||
format("Nix expects output path ‘%1%’ to have %2% hash ‘%3%’, instead it has ‘%4%’")
|
format("output path ‘%1%’ has %2% hash ‘%3%’ when ‘%4%’ was expected")
|
||||||
% path % i.second.hashAlgo % printHash16or32(h) % printHash16or32(h2));
|
% path % i.second.hashAlgo % printHash16or32(h2) % printHash16or32(h));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get rid of all weird permissions. This also checks that
|
/* Get rid of all weird permissions. This also checks that
|
||||||
|
|
Loading…
Reference in a new issue