Skip to content

Commit b6931d0

Browse files
weltlingnikic
authored andcommitted
Fix exit status propagation on AppVeyor
1 parent 9c9b58d commit b6931d0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.appveyor.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ build_script:
115115
echo "call phpize 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
116116
echo "call configure --enable-ast --enable-debug-pack 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
117117
echo "nmake /nologo 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
118-
$here = (Get-Item -Path ".\" -Verbose).FullName
118+
echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
119+
$here = (Get-Item -Path "." -Verbose).FullName
119120
$runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
120121
$task = $here + '\task.bat'
121122
& $runner -t $task
@@ -149,10 +150,12 @@ test_script:
149150
}
150151
cd c:\projects\ast
151152
echo "" | Out-File -Encoding "ASCII" task.bat
153+
echo "set REPORT_EXIT_STATUS=1" | Out-File -Encoding "ASCII" -Append task.bat
152154
$cmd = 'call configure --enable-ast --with-prefix=c:\build-cache\' + $dname + " 2>&1"
153155
echo $cmd | Out-File -Encoding "ASCII" -Append task.bat
154156
echo "nmake /nologo test TESTS=-q 2>&1" | Out-File -Encoding "ASCII" -Append task.bat
155-
$here = (Get-Item -Path ".\" -Verbose).FullName
157+
echo "exit %errorlevel%" | Out-File -Encoding "ASCII" -Append task.bat
158+
$here = (Get-Item -Path "." -Verbose).FullName
156159
$runner = 'c:\build-cache\php-sdk-' + $env:BIN_SDK_VER + '\phpsdk' + '-' + $env:VC + '-' + $env:ARCH + '.bat'
157160
$task = $here + '\task.bat'
158161
& $runner -t $task

0 commit comments

Comments
 (0)