diff --git 003/cpan/CPAN/lib/CPAN/FirstTime.pm 004/cpan/CPAN/lib/CPAN/FirstTime.pm index 49fa8ab..4f59593 100644 --- 003/cpan/CPAN/lib/CPAN/FirstTime.pm +++ 004/cpan/CPAN/lib/CPAN/FirstTime.pm @@ -1492,6 +1492,22 @@ sub _init_external_progs { next; } + # Let's not store full paths to programs in MSYS2 because + # paths change across shells. For example let's not use 32-bit + # programs in the 64-bit shell. + + if ($^O eq 'MSWin32') { + $CPAN::Config->{$progname} = $CPAN::Config->{$progname} + || $Config::Config{$progname} + || $progname; + if ($CPAN::Config->{$progname} eq 'make') { + # (msys) make doesn't like the cmd.exe-friendly makefiles that are + # created when installing modules, so stick to mingw32-make. + $CPAN::Config->{$progname} = 'mingw32-make'; + } + next; + } + my $progcall = $progname; unless ($matcher) { # we really don't need ncftp if we have ncftpget, but