You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Powershell does not automatically exit if a subcommand fails, ie. it behaves similar to a Bash script without `set -e`. This means that `swift test` could fail and `run.ps1` would still return exit code 0, indicating success.
Add an `Invoke-Program` utility to `run.ps1` that propagates error codes.
Copy file name to clipboardexpand all lines: .github/workflows/swift_package_test.yml
+19-8
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,10 @@ on:
37
37
default: ""
38
38
windows_build_command:
39
39
type: string
40
-
description: "Windows Command Prompt command to build and test the package"
40
+
description: |
41
+
Windows Command Prompt command to build and test the package.
42
+
Note that Powershell does not automatically exit if a subcommand fails. The Invoke-Program utility is available to propagate non-zero exit codes.
43
+
It is strongly encouraged to run all command using `Invoke-Program` unless you want to continue on error eg. `Invoke-Program git apply patch.diff` instead of `git apply patch.diff`.
0 commit comments