Skip to content

Commit ab47769

Browse files
committed
Clarify the various purposes of shell: bash
We set `shell: bash` explicitly in several places, for three different reasons. At least two of the reasons (those in `ci.yml`) are not not obvious without explanation. This clarifies the existing comments that explained this, and adds such comments where absent.
1 parent b8b4f7c commit ab47769

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
)
3939
apt-get update
4040
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
41-
shell: bash
41+
shell: bash # This step needs `bash`, and the default in container jobs is `sh`.
4242
- name: Verify that we are in an environment with limited dev tools
4343
run: |
4444
set -x
@@ -264,7 +264,7 @@ jobs:
264264
dpkg --add-architecture ${{ matrix.runner-arch }}
265265
apt-get update
266266
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
267-
shell: bash
267+
shell: bash # This step needs `bash`, and the default in container jobs is `sh`.
268268
- uses: actions/checkout@v4
269269
- name: Install Rust via Rustup
270270
run: |
@@ -427,7 +427,7 @@ jobs:
427427
428428
defaults:
429429
run:
430-
shell: bash # Without specifying this, we don't get `-o pipefail`.
430+
shell: bash # Without this, the shell here is `bash` but without `-o pipefail`.
431431

432432
steps:
433433
- name: Find this workflow

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions:
1717

1818
defaults:
1919
run:
20-
shell: bash
20+
shell: bash # Use `bash` even in the Windows jobs.
2121

2222
jobs:
2323
# Create a draft release, initially with no binary assets attached.

0 commit comments

Comments
 (0)