Skip to content

Commit

Permalink
Merge pull request #521 from haarg/add-dot-to-inc
Browse files Browse the repository at this point in the history
set PERL_USE_UNSAFE_INC so . is included in @inc
  • Loading branch information
miyagawa committed Jan 31, 2017
2 parents 3f520cf + f3baae3 commit ae585f9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/App/cpanminus/script.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,9 @@ sub configure {
$ENV{PERL_MB_OPT} .= " --pureperl-only";
}

local $ENV{PERL_USE_UNSAFE_INC} = 1
unless exists $ENV{PERL_USE_UNSAFE_INC};

$cmd = $self->append_args($cmd, 'configure') if $depth == 0;

local $self->{verbose} = $self->{verbose} || $self->{interactive};
Expand All @@ -1275,6 +1278,9 @@ sub build {

local $ENV{PERL_MM_USE_DEFAULT} = !$self->{interactive};

local $ENV{PERL_USE_UNSAFE_INC} = 1
unless exists $ENV{PERL_USE_UNSAFE_INC};

$cmd = $self->append_args($cmd, 'build') if $depth == 0;

return 1 if $self->run_timeout($cmd, $self->{build_timeout});
Expand All @@ -1299,6 +1305,9 @@ sub test {

$cmd = $self->append_args($cmd, 'test') if $depth == 0;

local $ENV{PERL_USE_UNSAFE_INC} = 1
unless exists $ENV{PERL_USE_UNSAFE_INC};

return 1 if $self->run_timeout($cmd, $self->{test_timeout});
if ($self->{force}) {
$self->diag_fail("Testing $distname failed but installing it anyway.");
Expand All @@ -1323,6 +1332,9 @@ sub install {
return 1;
}

local $ENV{PERL_USE_UNSAFE_INC} = 1
unless exists $ENV{PERL_USE_UNSAFE_INC};

if ($self->{sudo}) {
unshift @$cmd, "sudo";
}
Expand Down

0 comments on commit ae585f9

Please sign in to comment.