mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Suppress error in Get-Php run before PHP setup in win32.ps1
This commit is contained in:
parent
345999bf0b
commit
92b4784fb6
@ -508,7 +508,13 @@ Step-Log "Setup PHP"
|
|||||||
$installed = $null
|
$installed = $null
|
||||||
if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
||||||
try {
|
try {
|
||||||
$installed = Get-Php -Path $php_dir
|
if(Test-Path $php_dir\php.ini) {
|
||||||
|
Rename-Item -Path $php_dir\php.ini -NewName 'php.ini.bak'
|
||||||
|
}
|
||||||
|
$installed = Get-Php -Path $php_dir -ErrorAction SilentlyContinue 2>$null 3>$null
|
||||||
|
if(Test-Path $php_dir\php.ini.bak) {
|
||||||
|
Rename-Item -Path $php_dir\php.ini.bak -NewName 'php.ini'
|
||||||
|
}
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
$status = "Installed"
|
$status = "Installed"
|
||||||
|
Loading…
Reference in New Issue
Block a user