File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -437,12 +437,18 @@ sub _install_module {
437437 my $dumper_file = catfile($self -> global-> {debug_dir }, " mod_install_${shortname} _${now} .list.dumper.txt" );
438438 my $nstore_file = catfile($self -> global-> {debug_dir }, " mod_install_${shortname} _${now} .list.nstore.txt" );
439439
440- my $env = {
441- PERL_MM_USE_DEFAULT => 1, AUTOMATED_TESTING => undef , RELEASE_TESTING => undef ,
442- PERL5_CPANPLUS_HOME => $self -> global-> {build_ENV }-> {APPDATA }, # workaround for CPANPLUS
443- PERL_CPANM_HOME => ($self -> global-> {build_ENV }-> {APPDATA } . ' /.cpanm' ), # GH#101
444- PKG_CONFIG_PATH => ($self -> global-> {image_dir } . ' /c/lib/pkgconf' ), # just to be sure
445- };
440+ # if we're building with MSVC, we can't clobber the environment. ugh.
441+ my $env = {};
442+ if ($self -> global-> {maketool } eq ' nmake' ) {
443+ $env = {%ENV };
444+ }
445+ $env -> {PERL_MM_USE_DEFAULT } = 1;
446+ $env -> {AUTOMATED_TESTING } = undef ;
447+ $env -> {RELEASE_TESTING } = undef ;
448+ $env -> {PERL5_CPANPLUS_HOME } = $self -> global-> {build_ENV }-> {APPDATA }; # workaround for CPANPLUS
449+ $env -> {PERL_CPANM_HOME } = ($self -> global-> {build_ENV }-> {APPDATA } . ' /.cpanm' ); # GH#101
450+ $env -> {PKG_CONFIG_PATH } = ($self -> global-> {image_dir } . ' /c/lib/pkgconf' ); # just to be sure
451+
446452 # resolve macros in env{}
447453 if (defined $args {env } && ref $args {env } eq ' HASH' ) {
448454 for my $var (keys %{$args {env }}) {
You can’t perform that action at this time.
0 commit comments