Repository navigation
ci: declare shell: bash as the workflow default so every run step gets pipefail - #911
Open
jessealama wants to merge 1 commit into
Open
jessealama wants to merge 1 commit into
jessealama wants to merge 1 commit into
Conversation
jessealama
requested review from
arademaker,
chenson2018,
fmontesi,
kim-em and
sorrachai
as code owners
September 16, 2026 08:43
When a run step has no shell key, GitHub executes it with 'bash -e {0}';
declaring 'shell: bash' explicitly upgrades that to
'bash --noprofile --norc -eo pipefail {0}', so every step gets pipefail
for free. Applied to the Lean Action CI, shellcheck and weekly-lints workflows.
Audited every existing pipeline for behaviour changes:
- weekly-lints: 'lake build | tee' already sets pipefail by hand and
captures the status with '|| build_status=$?', so nothing changes
- shellcheck: a failure of the 'find' feeding xargs now fails the step
instead of being masked
- the remaining bash steps contain no pipelines
The explicit 'set -e' lines in lean_action_ci.yml are dropped as
redundant; steps with 'shell: python' are unaffected by the default.
jessealama
force-pushed
the
ci/default-shell-bash
branch
from
November 25, 2026 13:56
18507dc to
956a999
Compare
jessealama
requested review from
SamuelSchlesinger,
crei,
ctchou and
thomaskwaring
as code owners
November 25, 2026 13:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a workflow-level
defaults: run: shell: bashblock to the six workflows that haverun:steps. The issue is that when a step has noshell:key, GitHub runs it underbash -e {0}. That's good, but we can do better. The explicit declaration upgrades this tobash --noprofile --norc -eo pipefail {0}, so every step automatically gets thepipefailoption set.Remove
set -elines inlean_action_ci.ymlare dropped, since they're redundant.