Fix extension_version on windows

This commit is contained in:
Shivam Mathur 2020-02-14 15:09:56 +05:30
parent 2c559eae3d
commit d99c8732ba
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
3 changed files with 6 additions and 15 deletions

8
dist/index.js vendored
View File

@ -2765,13 +2765,7 @@ function addExtensionWindows(extension_csv, version, pipe) {
break;
// match exact versions
case /.*-\d+\.\d+\.\d+/.test(version_extension):
script +=
'\nAdd-Extension ' +
extension_name +
' ' +
'stable' +
' ' +
stability;
script += '\nAdd-Extension ' + extension_name + ' stable ' + stability;
return;
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):

View File

@ -104,13 +104,7 @@ export async function addExtensionWindows(
break;
// match exact versions
case /.*-\d+\.\d+\.\d+/.test(version_extension):
script +=
'\nAdd-Extension ' +
extension_name +
' ' +
'stable' +
' ' +
stability;
script += '\nAdd-Extension ' + extension_name + ' stable ' + stability;
return;
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$/.test(version_extension):

View File

@ -55,7 +55,10 @@ Function Add-Extension {
}
}
else {
Install-PhpExtension -Extension $extension -MinimumStability $mininum_stability -Version $extension_version -Path $php_dir
if($extension_version -ne '') {
$extension = "$extension -Version $extension_version"
}
Install-PhpExtension -Extension $extension -MinimumStability $mininum_stability -Path $php_dir
Add-Log $tick $extension "Installed and enabled"
}
}