Skip to content

Commit fa5d153

Browse files
committed
ci(ui-tests): use a better way to call AutoHotKey
By using the `/ErrorStdOut` flag (which required `| Out-Default` because `AutoHotKey64.exe` is a GUI program and would therefore not show any stderr otherwise), we can avoid those blocking dialogs that are so hard to diagnose when running AutoHotKey in a GitHub workflow. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent b908190 commit fa5d153

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/ui-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ jobs:
8484
- name: Run UI tests
8585
id: ui-tests
8686
run: |
87-
$p = Start-Process -PassThru -FilePath "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" -ArgumentList ui-tests\background-hook.ahk, "$PWD\bg-hook"
88-
$p.WaitForExit()
89-
if ($p.ExitCode -ne 0) { echo "::error::Test failed!" } else { echo "::notice::Test log" }
87+
$exitCode = 0
88+
& "${env:RUNNER_TEMP}\ahk\AutoHotKey64.exe" /ErrorStdOut /force ui-tests\background-hook.ahk "$PWD\bg-hook" 2>&1 | Out-Default
89+
if (!$?) { $exitCode = 1; echo "::error::Test failed!" } else { echo "::notice::Test log" }
9090
type bg-hook.log
91-
if ($p.ExitCode -ne 0) { exit 1 }
91+
exit $exitCode
9292
- name: Show logs, if canceled
9393
if: cancelled()
9494
run: type bg-hook.log

0 commit comments

Comments
 (0)