diff --git a/perl/lib/Nix/Manifest.pm b/perl/lib/Nix/Manifest.pm index 93c9c261..fb4a4646 100644 --- a/perl/lib/Nix/Manifest.pm +++ b/perl/lib/Nix/Manifest.pm @@ -462,9 +462,16 @@ sub parseNARInfo { return undef; } - my $fingerprint = fingerprintPath( - $storePath, $narHash, $narSize, - [ map { "$Nix::Config::storeDir/$_" } @refs ]); + my $fingerprint; + eval { + $fingerprint = fingerprintPath( + $storePath, $narHash, $narSize, + [ map { "$Nix::Config::storeDir/$_" } @refs ]); + }; + if ($@) { + warn "cannot compute fingerprint of ‘$location’; ignoring\n"; + return undef; + } if (!checkSignature($publicKey, decode_base64($sig64), $fingerprint)) { warn "NAR info file ‘$location’ has an incorrect signature; ignoring\n";