Skip to content

Commit 10e1d61

Browse files
committed
Handle exit code of install steps on Windows
1 parent 754b5f3 commit 10e1d61

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

.github/actions/install-mono/action.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ runs:
1414
- name: Cache setup on Windows
1515
if: runner.os == 'Windows'
1616
run: |
17-
mkdir -p .choco-cache
18-
choco config set cacheLocation $(pwd)/.choco-cache
19-
shell: bash
17+
New-Item -ItemType Directory -Path .choco-cache -Force | Out-Null
18+
choco config set cacheLocation "$PWD/.choco-cache"
19+
if ($LASTEXITCODE) { exit $LASTEXITCODE }
20+
shell: pwsh
2021

2122
- name: Cache on Windows
2223
if: runner.os == 'Windows'
@@ -52,13 +53,17 @@ runs:
5253

5354
- name: Install on Windows (x86)
5455
if: runner.os == 'Windows' && inputs.arch == 'x86'
55-
run: choco install --x86 -y mono
56-
shell: sh
56+
run: |
57+
choco install --x86 -y mono
58+
if ($LASTEXITCODE) { exit $LASTEXITCODE }
59+
shell: pwsh
5760

5861
- name: Install on Windows
5962
if: runner.os == 'Windows' && inputs.arch != 'x86'
60-
run: choco install -y mono
61-
shell: sh
63+
run: |
64+
choco install -y mono
65+
if ($LASTEXITCODE) { exit $LASTEXITCODE }
66+
shell: pwsh
6267

6368
# ===================================
6469
#

0 commit comments

Comments
 (0)