Subject: | make install fails with spaces in make_install_make_command |
Default ActiveState/MSVC9 build, with
make_install_make_command being stored as
q[C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.EXE]
make test correctly quotes the system call, make install not.
Error:
"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.EXE" test -
- OK
Running make install
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
This looks right to me:
diff --git a/cpan/CPAN/lib/CPAN/Distribution.pm
b/cpan/CPAN/lib/CPAN/Distribution.pm
index 32648ec..18a11da 100644
--- a/cpan/CPAN/lib/CPAN/Distribution.pm
+++ b/cpan/CPAN/lib/CPAN/Distribution.pm
@@ -3555,7 +3555,9 @@ sub install {
$CPAN::Config->{mbuild_install_build_command} :
$self->_build_command();
$system = sprintf("%s install %s",
- $mbuild_install_build_command,
+ $mbuild_install_build_command =~ m/\s/
+ ? qq{"$mbuild_install_build_command"}
+ : $mbuild_install_build_command,
$CPAN::Config->{mbuild_install_arg},
);
} else {
@@ -3564,7 +3566,9 @@ sub install {
q{make_install_make_command})
|| $self->_make_command();
$system = sprintf("%s install %s",
- $make_install_make_command,
+ $make_install_make_command =~ m/\s/
+ ? qq{"$make_install_make_command"}
+ : $make_install_make_command,
$CPAN::Config->{make_install_arg},
);
}
--
Reini Urban