aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/builtins
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-08-06 19:00:33 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2020-08-06 21:04:31 -0500
commit96c158d6e1c6c3bed6451a3c6447d2b0bd0337ad (patch)
tree56e49e49e9afb7c4852547fbe68b17c0f405259e /src/libstore/builtins
parent8abc577cc2a4f7252180265355128d29bcdb4d44 (diff)
Fix build
Diffstat (limited to 'src/libstore/builtins')
-rw-r--r--src/libstore/builtins/fetchurl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/builtins/fetchurl.cc b/src/libstore/builtins/fetchurl.cc
index 2048f8f87..4fb5d8a06 100644
--- a/src/libstore/builtins/fetchurl.cc
+++ b/src/libstore/builtins/fetchurl.cc
@@ -63,8 +63,8 @@ void builtinFetchurl(const BasicDerivation & drv, const std::string & netrcData)
for (auto hashedMirror : settings.hashedMirrors.get())
try {
if (!hasSuffix(hashedMirror, "/")) hashedMirror += '/';
- auto ht = parseHashType(getAttr("outputHashAlgo"));
- auto h = Hash(getAttr("outputHash"), ht);
+ std::optional<HashType> ht = parseHashTypeOpt(getAttr("outputHashAlgo"));
+ Hash h = newHashAllowEmpty(getAttr("outputHash"), ht);
fetch(hashedMirror + printHashType(h.type) + "/" + h.to_string(Base16, false));
return;
} catch (Error & e) {