about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2015-11-18T17·17+0100
committerPeter Simons <simons@cryp.to>2015-11-19T11·42+0100
commit6ad10591ce2a0e608309064a6ab6cee4c3aa8d04 (patch)
treef7e756b8c209868800ecafd1249c6ed33ba1f7e4 /src/libstore
parent9ee15abe30830b2de3277b30c709893990d41179 (diff)
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’
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index f5f91d61711f..86697bda8139 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -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));
         }