Skip to content

Commit

Permalink
Merge pull request #3208 from metacpan/oalders/asset-map
Browse files Browse the repository at this point in the history
Make asset map exception easier to debug
  • Loading branch information
oalders authored Oct 17, 2024
2 parents 0615988 + 1d3aab8 commit 92329ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/MetaCPAN/Middleware/Static.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ sub _file_app {

sub _get_assets {
my ($root) = @_;
open my $fh, '<', "$root/assets/assets.json"
or die "can't find asset map";
my $filename = "$root/assets/assets.json";
open my $fh, '<', $filename
or die "💥 can't find asset map: $filename";
my $json = do { local $/; <$fh> };
close $fh;
my $files = Cpanel::JSON::XS->new->decode($json);
Expand Down

0 comments on commit 92329ea

Please sign in to comment.