mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Add extension to php.ini in windows using Add-Content
This commit is contained in:
parent
9134867822
commit
16f13a69eb
@ -57,7 +57,7 @@ function enableExtensionWindows(extension) {
|
||||
return (`try {
|
||||
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
||||
if(!(php -m | findstr -i ${extension}) -and $exist) {
|
||||
Enable-PhpExtension ${extension} C:\\tools\\php\n` +
|
||||
Add-Content C:\\tools\\php\\php.ini "extension=php_${extension}.dll"\n` +
|
||||
(yield utils.log(extension + ' enabled', 'win32', 'success')) +
|
||||
`}
|
||||
} catch [Exception] {\n` +
|
||||
|
@ -48,7 +48,7 @@ export async function enableExtensionWindows(extension: string) {
|
||||
`try {
|
||||
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
||||
if(!(php -m | findstr -i ${extension}) -and $exist) {
|
||||
Enable-PhpExtension ${extension} C:\\tools\\php\n` +
|
||||
Add-Content C:\\tools\\php\\php.ini "extension=php_${extension}.dll"\n` +
|
||||
(await utils.log(extension + ' enabled', 'win32', 'success')) +
|
||||
`}
|
||||
} catch [Exception] {\n` +
|
||||
|
Loading…
Reference in New Issue
Block a user