mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 05:23:03 +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 {
|
return (`try {
|
||||||
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
||||||
if(!(php -m | findstr -i ${extension}) -and $exist) {
|
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')) +
|
(yield utils.log(extension + ' enabled', 'win32', 'success')) +
|
||||||
`}
|
`}
|
||||||
} catch [Exception] {\n` +
|
} catch [Exception] {\n` +
|
||||||
|
@ -48,7 +48,7 @@ export async function enableExtensionWindows(extension: string) {
|
|||||||
`try {
|
`try {
|
||||||
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
$exist = Test-Path -Path $ext_dir\\php_${extension}.dll
|
||||||
if(!(php -m | findstr -i ${extension}) -and $exist) {
|
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')) +
|
(await utils.log(extension + ' enabled', 'win32', 'success')) +
|
||||||
`}
|
`}
|
||||||
} catch [Exception] {\n` +
|
} catch [Exception] {\n` +
|
||||||
|
Loading…
Reference in New Issue
Block a user