From 50a1327b1d80471eb471f8c3715552d4245d4f0b Mon Sep 17 00:00:00 2001 From: Nick Logan Date: Sat, 12 Oct 2024 06:54:48 -0700 Subject: [PATCH] Fix browse sub command error message 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. --- lib/Zef/CLI.rakumod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Zef/CLI.rakumod b/lib/Zef/CLI.rakumod index f89ae77b..bd92675f 100644 --- a/lib/Zef/CLI.rakumod +++ b/lib/Zef/CLI.rakumod @@ -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; + my %support = $candi.dist.meta.hash; my $url = %support{$url-type}; my @has-urls = grep { %support{$_} }, ; unless $url && $url.starts-with('http://' | 'https://') {