mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11:06 +07:00
Fix logs on windows for pre-installed version
This commit is contained in:
parent
9e7bc5c91f
commit
88fb99b592
@ -171,6 +171,7 @@ if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Step-Log "Setup PHP"
|
Step-Log "Setup PHP"
|
||||||
|
$status = "Installed"
|
||||||
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.')))) {
|
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.')))) {
|
||||||
if ($version -lt '7.0') {
|
if ($version -lt '7.0') {
|
||||||
Install-Module -Name VcRedist -Force
|
Install-Module -Name VcRedist -Force
|
||||||
@ -181,9 +182,11 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
|
|||||||
}
|
}
|
||||||
|
|
||||||
Install-Php -Version $version -Architecture $arch -ThreadSafe $true -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
|
Install-Php -Version $version -Architecture $arch -ThreadSafe $true -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force >$null 2>&1
|
||||||
|
} else {
|
||||||
|
$updated = Update-Php $php_dir >$null 2>&1
|
||||||
|
if($updated -eq $False) {
|
||||||
|
$status = "Found"
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Update-Php $php_dir >$null 2>&1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$installed = Get-Php -Path $php_dir
|
$installed = Get-Php -Path $php_dir
|
||||||
@ -195,4 +198,4 @@ if ($version -eq 'master') {
|
|||||||
Set-PhpIniKey -Key 'opcache.jit_buffer_size' -Value '256M' -Path $php_dir
|
Set-PhpIniKey -Key 'opcache.jit_buffer_size' -Value '256M' -Path $php_dir
|
||||||
Set-PhpIniKey -Key 'opcache.jit' -Value '1235' -Path $php_dir
|
Set-PhpIniKey -Key 'opcache.jit' -Value '1235' -Path $php_dir
|
||||||
}
|
}
|
||||||
Add-Log $tick "PHP" "Installed PHP $($installed.FullVersion)"
|
Add-Log $tick "PHP" "$status PHP $($installed.FullVersion)"
|
||||||
|
Loading…
Reference in New Issue
Block a user