aboutsummaryrefslogtreecommitdiff
path: root/perl/lib
diff options
context:
space:
mode:
Diffstat (limited to 'perl/lib')
-rw-r--r--perl/lib/Nix/Manifest.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perl/lib/Nix/Manifest.pm b/perl/lib/Nix/Manifest.pm
index 93c9c261d..fb4a46469 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";