Skip to content

Commit ab049f6

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 b856ad9 commit ab049f6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
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
@@ -232,7 +232,7 @@ jobs:
232232
dpkg --add-architecture ${{ matrix.runner-arch }}
233233
apt-get update
234234
apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
235-
shell: bash
235+
shell: bash # This step needs `bash`, and the default in container jobs is `sh`.
236236
- uses: actions/checkout@v4
237237
- uses: dtolnay/rust-toolchain@stable
238238
with:
@@ -392,7 +392,7 @@ jobs:
392392
393393
defaults:
394394
run:
395-
shell: bash # Without specifying this, we don't get `-o pipefail`.
395+
shell: bash # Without this, the shell here is `bash` but without `-o pipefail`.
396396

397397
steps:
398398
- name: Find this workflow

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
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)