diff --git a/src/Package/Library/openssl.php b/src/Package/Library/openssl.php index 69297198..08ff8b02 100644 --- a/src/Package/Library/openssl.php +++ b/src/Package/Library/openssl.php @@ -25,7 +25,12 @@ class openssl if (SystemTarget::getTargetOS() === 'Windows') { global $argv; $perl_path_native = PKG_ROOT_PATH . '\strawberry-perl-' . arch2gnu(php_uname('m')) . '-win\perl\bin\perl.exe'; - $perl = file_exists($perl_path_native) ? ($perl_path_native) : WindowsUtil::findCommand('perl.exe'); + $perl_path_doctor = PKG_ROOT_PATH . '\strawberry-perl\perl\bin\perl.exe'; + $perl = match (true) { + file_exists($perl_path_native) => $perl_path_native, + file_exists($perl_path_doctor) => $perl_path_doctor, + default => WindowsUtil::findCommand('perl.exe'), + }; if ($perl === null) { throw new EnvironmentException( 'You need to install perl first!', @@ -42,7 +47,7 @@ class openssl $perl = ApplicationContext::get('perl'); $cmd = cmd()->cd($lib->getSourceDir()) ->exec( - "{$perl} Configure zlib VC-WIN64A " . + quote($perl) . ' Configure zlib VC-WIN64A ' . 'no-shared ' . '--prefix=' . quote($lib->getBuildRootPath()) . ' ' . '--with-zlib-lib=' . quote($lib->getLibDir()) . ' ' .