aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2018-04-20 21:07:32 +0200
committerDaiderd Jordan <daiderd@gmail.com>2018-04-20 21:07:32 +0200
commit13d4d1c0a2489a5fab506da57149863daf7f01b1 (patch)
treec639f67e35c4264e19e6ac63a73ab1e5ff5ddaa7
parent9296186c759f1ef301e20fc7e246f104a206efa4 (diff)
download: make hash mismatch error consistent with fetchurl
-rw-r--r--src/libstore/download.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/download.cc b/src/libstore/download.cc
index 4d7f56901..538c558f5 100644
--- a/src/libstore/download.cc
+++ b/src/libstore/download.cc
@@ -730,8 +730,8 @@ Path Downloader::downloadCached(ref<Store> store, const string & url_, bool unpa
Hash gotHash = unpack
? hashPath(expectedHash.type, store->toRealPath(storePath)).first
: hashFile(expectedHash.type, store->toRealPath(storePath));
- throw nix::Error("hash mismatch in file downloaded from '%s': expected hash '%s', got '%s'",
- url, expectedHash.to_string(), gotHash.to_string());
+ throw nix::Error("hash mismatch in file downloaded from '%s': got hash '%s' instead of the expected hash '%s'",
+ url, gotHash.to_string(), expectedHash.to_string());
}
return store->toRealPath(storePath);