forked from lix-project/lix
outputHashAlgo
can be blank so parse accordingly
It is blank for SRI hashes.
This commit is contained in:
parent
1fcd3afc38
commit
406dbb7fce
|
@ -63,7 +63,7 @@ void builtinFetchurl(const BasicDerivation & drv, const std::string & netrcData)
|
||||||
for (auto hashedMirror : settings.hashedMirrors.get())
|
for (auto hashedMirror : settings.hashedMirrors.get())
|
||||||
try {
|
try {
|
||||||
if (!hasSuffix(hashedMirror, "/")) hashedMirror += '/';
|
if (!hasSuffix(hashedMirror, "/")) hashedMirror += '/';
|
||||||
auto ht = parseHashType(getAttr("outputHashAlgo"));
|
auto ht = parseHashTypeOpt(getAttr("outputHashAlgo"));
|
||||||
auto h = Hash(getAttr("outputHash"), ht);
|
auto h = Hash(getAttr("outputHash"), ht);
|
||||||
fetch(hashedMirror + printHashType(*h.type) + "/" + h.to_string(Base::Base16, false));
|
fetch(hashedMirror + printHashType(*h.type) + "/" + h.to_string(Base::Base16, false));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue