mirror of
https://github.com/NixOS/nix
synced 2025-07-01 16:41:47 +02:00
Merge branch 'no-hash-type-unknown' into validPathInfo-temp
This commit is contained in:
commit
669c3992e8
43 changed files with 250 additions and 146 deletions
|
@ -9,10 +9,9 @@
|
|||
namespace nix {
|
||||
|
||||
std::string FileSystemHash::printMethodAlgo() const {
|
||||
return makeFileIngestionPrefix(method) + printHashType(hash.type);
|
||||
return makeFileIngestionPrefix(method) + printHashType(*hash.type);
|
||||
}
|
||||
|
||||
|
||||
const StorePath & BasicDerivation::findOutput(const string & id) const
|
||||
{
|
||||
auto i = outputs.find(id);
|
||||
|
@ -121,8 +120,6 @@ static DerivationOutput parseDerivationOutput(const Store & store, istringstream
|
|||
hashAlgo = string(hashAlgo, 2);
|
||||
}
|
||||
const HashType hashType = parseHashType(hashAlgo);
|
||||
if (hashType == htUnknown)
|
||||
throw Error("unknown hash hashAlgorithm '%s'", hashAlgo);
|
||||
fsh = FileSystemHash {
|
||||
std::move(method),
|
||||
Hash(hash, hashType),
|
||||
|
@ -421,8 +418,6 @@ static DerivationOutput readDerivationOutput(Source & in, const Store & store)
|
|||
hashAlgo = string(hashAlgo, 2);
|
||||
}
|
||||
const HashType hashType = parseHashType(hashAlgo);
|
||||
if (hashType == htUnknown)
|
||||
throw Error("unknown hash hashAlgorithm '%s'", hashAlgo);
|
||||
fsh = FileSystemHash {
|
||||
std::move(method),
|
||||
Hash(hash, hashType),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue