mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-23 23:29:07 +07:00
Optimize installation scripts
This commit is contained in:
@ -52,7 +52,7 @@ function enableExtensionWindows(extension) {
|
||||
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
||||
$enabled = php -r "if (in_array('${extension}', get_loaded_extensions())) {echo 'yes';} else {echo 'no';}"
|
||||
if($enabled -eq 'no' -and $exist) {
|
||||
Enable-PhpExtension ${extension} C:\\tools\\php$version
|
||||
Enable-PhpExtension ${extension} C:\\tools\\php
|
||||
$${extension}_found = 1
|
||||
}
|
||||
} catch [Exception] {
|
||||
@ -208,7 +208,7 @@ function addINIValuesWindows(ini_values_csv) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// add script to set ini value
|
||||
script +=
|
||||
'Add-Content C:\\tools\\php$version\\php.ini "' + ini_value + '"\n';
|
||||
'Add-Content C:\\tools\\php\\php.ini "' + ini_value + '"\n';
|
||||
});
|
||||
});
|
||||
return script;
|
||||
|
Reference in New Issue
Block a user