From 13d4d1c0a2489a5fab506da57149863daf7f01b1 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 20 Apr 2018 21:07:32 +0200 Subject: download: make hash mismatch error consistent with fetchurl --- src/libstore/download.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libstore') diff --git a/src/libstore/download.cc b/src/libstore/download.cc index 4d7f5690192d..538c558f5501 100644 --- a/src/libstore/download.cc +++ b/src/libstore/download.cc @@ -730,8 +730,8 @@ Path Downloader::downloadCached(ref 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); -- cgit 1.4.1