mirror of
https://github.com/NixOS/nix
synced 2025-07-04 23:51:47 +02:00
Merge pull request #11933 from DeterminateSystems/no-narHash
fetchTree: Don't crash if narHash is missing
This commit is contained in:
commit
838d3c1ad0
1 changed files with 2 additions and 3 deletions
|
@ -33,8 +33,7 @@ void emitTreeAttrs(
|
|||
|
||||
// FIXME: support arbitrary input attributes.
|
||||
|
||||
auto narHash = input.getNarHash();
|
||||
assert(narHash);
|
||||
if (auto narHash = input.getNarHash())
|
||||
attrs.alloc("narHash").mkString(narHash->to_string(HashFormat::SRI, true));
|
||||
|
||||
if (input.getType() == "git")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue