Fix fail-fast in Windows

This commit is contained in:
Shivam Mathur 2020-11-25 05:39:44 +05:30
parent 19b09596c6
commit c6150c6a2b
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -8,10 +8,7 @@ param (
[ValidateNotNull()] [ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)] [ValidateLength(1, [int]::MaxValue)]
[string] [string]
$dist, $dist
[Parameter(Position = 2, Mandatory = $false)]
[string]
$fail_fast = 'false'
) )
# Function to log start of a operation. # Function to log start of a operation.
@ -25,7 +22,7 @@ Function Add-Log($mark, $subject, $message) {
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
} else { } else {
printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
if($fail_fast -eq 'true') { if($env:fail_fast -eq 'true') {
exit 1; exit 1;
} }
} }
@ -416,9 +413,9 @@ if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version
} }
$installed = Get-Php -Path $php_dir $installed = Get-Php -Path $php_dir
('date.timezone=UTC', 'memory_limit=-1') | foreach { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir } ('date.timezone=UTC', 'memory_limit=-1') | ForEach-Object { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir }
if($version -lt "5.5") { if($version -lt "5.5") {
('libeay32.dll', 'ssleay32.dll') | ForEach { Invoke-WebRequest -Uri $bintray/$_ -OutFile $php_dir\$_ >$null 2>&1 } ('libeay32.dll', 'ssleay32.dll') | ForEach-Object { Invoke-WebRequest -Uri $bintray/$_ -OutFile $php_dir\$_ >$null 2>&1 }
} else { } else {
$enable_extensions += ('opcache') $enable_extensions += ('opcache')
} }