Skip to content

Commit

Permalink
Fix browse sub command error message
Browse files Browse the repository at this point in the history
Previously when using `zef browse ...` with a distribution that
does not have a "support" section in it's META6.json it would give
an unhelpful error related to hash initialization. This fixes the
issue by ensuring we have an empty hash.
  • Loading branch information
ugexe committed Oct 12, 2024
1 parent 0e4e9de commit 50a1327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Zef/CLI.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ package Zef::CLI {
my $candi = $client.resolve($identity).head
|| $client.search($identity, :strict, :max-results(1))[0]\
|| abort "!!!> Found no candidates matching identity: {$identity}";
my %support = $candi.dist.meta<support>;
my %support = $candi.dist.meta<support>.hash;
my $url = %support{$url-type};
my @has-urls = grep { %support{$_} }, <homepage bugtracker source>;
unless $url && $url.starts-with('http://' | 'https://') {
Expand Down

0 comments on commit 50a1327

Please sign in to comment.