summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-12-28 20:10:13 +0000
committerSean Whitton <spwhitton@spwhitton.name>2019-12-28 20:10:13 +0000
commit6a643d0ded219157dab13635f82cf7c57f8ede4c (patch)
treee13ddd0a965e9845bd6bf824d2c08228b098f0f1 /lib
parent9a7a97968244a05c5f334f5d280b308ac4bb31c5 (diff)
downloaddotfiles-6a643d0ded219157dab13635f82cf7c57f8ede4c.tar.gz
you can't return from a Try::Tiny catch block
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5/Local/MrRepo/Repo/Git/Annex.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/perl5/Local/MrRepo/Repo/Git/Annex.pm b/lib/perl5/Local/MrRepo/Repo/Git/Annex.pm
index de2255ab..14ac7377 100644
--- a/lib/perl5/Local/MrRepo/Repo/Git/Annex.pm
+++ b/lib/perl5/Local/MrRepo/Repo/Git/Annex.pm
@@ -294,9 +294,11 @@ sub abs_contentlocation {
($contentlocation) = $self->git->annex("contentlocation", $key);
}
catch {
- return undef;
+ undef $contentlocation;
};
- return rel2abs($contentlocation, $self->toplevel);
+ return (defined $contentlocation)
+ ? rel2abs($contentlocation, $self->toplevel)
+ : undef;
}
1;