Skip to content

Commit a985af3

Browse files
HenrZureneSchm
andauthored
1220 Add log for msvc example runs (#1221)
Co-authored-by: reneSchm <49305466+reneSchm@users.noreply.github.com>
1 parent be0bc17 commit a985af3

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

.github/actions/windows-run_examples/action.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@ runs:
1919
$errchk = (Get-ChildItem -Path ./| Where-Object { $_.Name -like "*_example.exe"} | Measure-Object).Count
2020
if( $errchk -gt 0){
2121
Write-Output "Running windows Examples."
22-
Get-ChildItem -Path ./| Where-Object { $_.Name -like "*_example.exe"} | Foreach { Write "Running $_"; if( $(Start-Process $_.FullName -Passthru -Wait).ExitCode -ne 0){Write "Programm terminated with error, abort."; Exit 1}}
23-
} else {
24-
Write-Output "No Examples found, abort."
22+
Get-ChildItem -Path ./| Where-Object { $_.Name -like "*_example.exe" } | ForEach-Object {
23+
Write-Output "Running $($_.Name)"
24+
& $_.FullName
25+
if ($LASTEXITCODE -ne 0) {
26+
Write-Error "Programm terminated with error, abort."
27+
Exit 1
28+
}
29+
}
30+
}
31+
else {
32+
Write-Output "No Examples found, abort."
2533
Exit 1
2634
}

0 commit comments

Comments
 (0)