Skip to content

Commit

Permalink
Merge pull request #178 from hoelzro/master
Browse files Browse the repository at this point in the history
Fix a bug when using --installdeps and a dependency has a cpanfile
  • Loading branch information
miyagawa committed Nov 16, 2012
2 parents ec0719e + b703aa0 commit 9ba4e7d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/App/cpanminus/script.pm
Expand Up @@ -1286,7 +1286,7 @@ sub build_stuff {


$self->diag_progress("Configuring $target"); $self->diag_progress("Configuring $target");


my $configure_state = $self->configure_this($dist); my $configure_state = $self->configure_this($dist, $depth);


$self->diag_ok($configure_state->{configured_ok} ? "OK" : "N/A"); $self->diag_ok($configure_state->{configured_ok} ? "OK" : "N/A");


Expand Down Expand Up @@ -1389,9 +1389,9 @@ DIAG
} }


sub configure_this { sub configure_this {
my($self, $dist) = @_; my($self, $dist, $depth) = @_;


if (-e 'cpanfile' && $self->{installdeps}) { if (-e 'cpanfile' && $self->{installdeps} && $depth == 0) {
require Module::CPANfile; require Module::CPANfile;
$dist->{cpanfile} = eval { Module::CPANfile->load('cpanfile') }; $dist->{cpanfile} = eval { Module::CPANfile->load('cpanfile') };
return { return {
Expand Down Expand Up @@ -1464,10 +1464,10 @@ sub configure_this {
unless ($state->{configured_ok}) { unless ($state->{configured_ok}) {
while (1) { while (1) {
my $ans = lc $self->prompt("Configuring $dist->{dist} failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?", "s"); my $ans = lc $self->prompt("Configuring $dist->{dist} failed.\nYou can s)kip, r)etry, e)xamine build log, or l)ook ?", "s");
last if $ans eq 's'; last if $ans eq 's';
return $self->configure_this($dist) if $ans eq 'r'; return $self->configure_this($dist, $depth) if $ans eq 'r';
$self->show_build_log if $ans eq 'e'; $self->show_build_log if $ans eq 'e';
$self->look if $ans eq 'l'; $self->look if $ans eq 'l';
} }
} }


Expand Down

0 comments on commit 9ba4e7d

Please sign in to comment.