Add extension to php.ini in windows using Add-Content

This commit is contained in:
Shivam Mathur 2019-09-26 23:28:53 +05:30
parent 9134867822
commit 16f13a69eb
2 changed files with 2 additions and 2 deletions

View File

@ -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` +

View File

@ -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` +