Skip to content

Commit 6c36faf

Browse files
committed
Try setting shell to cmd.exe on Windows but bash on Linux or Mac for GitHub Actions
1 parent 00412f4 commit 6c36faf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
defaults:
2020
run:
21-
shell: bash
21+
# Use a conditional expression to set the default shell
22+
# 'cmd' on Windows, 'bash' on other platforms (Linux, macOS)
23+
shell: ${{ runner.os == 'Windows' && 'cmd' || 'bash' }}
2224
steps:
2325
- name: Check out
2426
uses: actions/checkout@v6.0.2

0 commit comments

Comments
 (0)