aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libfetchers/fetchers.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libfetchers/fetchers.cc b/src/libfetchers/fetchers.cc
index 08b83b0db..9c69fc564 100644
--- a/src/libfetchers/fetchers.cc
+++ b/src/libfetchers/fetchers.cc
@@ -203,8 +203,8 @@ std::optional<Hash> Input::getNarHash() const
if (auto s = maybeGetStrAttr(attrs, "narHash")) {
auto hash = s->empty() ? Hash(htSHA256) : Hash::parseSRI(*s);
if (hash.type != htSHA256)
- throw UsageError("narHash must be specified with SRI notation");
- return newHashAllowEmpty(*s, htSHA256);
+ throw UsageError("narHash must use SHA-256");
+ return hash;
}
return {};
}