Commit 8ccaf19
committed
Add error handling for exit code of Chocolatey
Powershell does not automatically exit a script when an `.exe` returns a
non-successful exit code. This is due to a lack of exit code
standardisation across programs for the Windows platform. Therefore we
need to check for the particular exit code of an `.exe` in order to
report it to the github actions platform. Note that exit codes from
`.exe` invocations are placed in `$LastExitCode` and exit codes from
Powershell cmdlets such as `Write-Output` are placed in the separate
`$?` variable.1 parent a202116 commit 8ccaf19
1 file changed
+15
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
614 | 619 | | |
615 | 620 | | |
616 | 621 | | |
| |||
664 | 669 | | |
665 | 670 | | |
666 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
667 | 677 | | |
668 | 678 | | |
669 | 679 | | |
| |||
731 | 741 | | |
732 | 742 | | |
733 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
734 | 749 | | |
735 | 750 | | |
736 | 751 | | |
| |||
0 commit comments