Permalink
Browse files

chdir to original working directory before each installing module

  • Loading branch information...
motemen committed Nov 1, 2011
1 parent 60c617a commit 215cb345d4312c744e7a299a7a33dbc6db33df74
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/App/cpanminus/script.pm
@@ -156,6 +156,8 @@ sub doit {
$self->configure_mirrors;
+ my $cwd = Cwd::cwd;
+
my @fail;
for my $module (@{$self->{argv}}) {
if ($module =~ s/\.pm$//i) {
@@ -173,6 +175,7 @@ sub doit {
}
}
+ $self->chdir($cwd);
$self->install_module($module, 0, $version)
or push @fail, $module;
}

0 comments on commit 215cb34

Please sign in to comment.