Skip to content

Commit

Permalink
do not die if ! -e $config_file
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Jan 28, 2011
1 parent 1bdf9f8 commit fe2a51e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Changes
@@ -1,6 +1,8 @@
Revision history for CPAN-Mini

{{$NEXT}}
if the config file does not exist, do not die or spew warnings; this
fixes RT #57388

1.100630 2010-03-04 07:57:34 America/New_York
suppress "using config..." during setup with -qq
Expand Down
4 changes: 4 additions & 0 deletions lib/CPAN/Mini.pm
Expand Up @@ -646,11 +646,15 @@ sub read_config {

my $config_file = $class->config_file($options);

return unless defined $config_file;

# This is ugly, but lets us respect -qq for now even before we have an
# object. I think a better fix is warranted. -- rjbs, 2010-03-04
$class->trace("Using config from $config_file\n")
unless $options->{quiet};

return unless -e $config_file;

open my $config_fh, '<', $config_file
or die "couldn't open config file $config_file: $!";

Expand Down

0 comments on commit fe2a51e

Please sign in to comment.