src/libstore/build.cc: clarify error message for hash mismatches
Nix reports a hash mismatch saying: output path ‘foo’ should have sha256 hash ‘abc’, instead has ‘xyz’ That message is slightly ambiguous and some people read that statement to mean the exact opposite of what it is supposed to mean. After this patch, the message will be: Nix expects output path ‘foo’ to have sha256 hash ‘abc’, instead it has ‘xyz’
This commit is contained in:
parent
9ee15abe30
commit
6ad10591ce
1 changed files with 1 additions and 1 deletions
|
@ -2708,7 +2708,7 @@ void DerivationGoal::registerOutputs()
|
|||
Hash h2 = recursive ? hashPath(ht, actualPath).first : hashFile(ht, actualPath);
|
||||
if (h != h2)
|
||||
throw BuildError(
|
||||
format("output path ‘%1%’ should have %2% hash ‘%3%’, instead has ‘%4%’")
|
||||
format("Nix expects output path ‘%1%’ to have %2% hash ‘%3%’, instead it has ‘%4%’")
|
||||
% path % i.second.hashAlgo % printHash16or32(h) % printHash16or32(h2));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue