Skip to content

Commit

Permalink
provide better diagnostics on PAUSE config file error
Browse files Browse the repository at this point in the history
  • Loading branch information
xdg authored and rjbs committed Aug 8, 2015
1 parent 37b00ff commit 577d436
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Dist/Zilla/Plugin/UploadToCPAN.pm
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ has pause_cfg => (
my $file = $self->pause_cfg_file;
$file = File::Spec->catfile($self->pause_cfg_dir, $file)
unless File::Spec->file_name_is_absolute($file);
return {} unless -e $file && -r _;
my $cfg = try {
CPAN::Uploader->read_config_file($file)
} catch {
$self->log("Couldn't load credentials from '$file': $_");
{};
};
return $cfg;
Expand Down

0 comments on commit 577d436

Please sign in to comment.