Use canonical SHELL + .SHELLFLAGS instead of the shorthand - #2230
Conversation
`SHELL := /bin/bash -o pipefail` happens to work in practice because
GNU Make splits the SHELL variable on whitespace when invoking, but
per the GNU Make documentation the canonical form is `SHELL := /bin/bash`
combined with the shell flags in `.SHELLFLAGS`. Switch the two sites
under ci-mgmt's control (the meta-Makefile and the bridged crossbuild.mk
template) to the canonical form:
SHELL := /bin/bash
.SHELLFLAGS := -eo pipefail -c
The extra `-e` makes every recipe invocation exit on first error by
default; recipes that already set `set -e` themselves are unaffected,
and recipes relying on commands continuing past a failure now have to
opt in explicitly with `cmd || true`. `make all` passes locally with
no other diffs beyond the regenerated test-providers fixtures.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
144eacb to
1943428
Compare
Parking this PR pending a lint-recipe fixWhile verifying the impact of cd provider && golangci-lint run …; LINT_EXIT=$$?; \
if git grep -ql 'goembed'; then git grep -l 'goembed' | xargs perl -i -pe 's/ goembed/go:embed/g'; fi; \
exit $$LINT_EXITThe first recipe line rewrites CI is unaffected (lint failure still aborts the workflow on an ephemeral runner), but local-dev experience after a lint failure is broken. Path forward
Leaving this PR as a draft until step 2 lands. |
Summary
SHELL := /bin/bash -o pipefailhappens to work in practice because GNU Make splits theSHELLvariable on whitespace when invoking, but per the GNU Make documentation the canonical form isSHELL := /bin/bashcombined with the shell flags in.SHELLFLAGS.Switch the two sites under ci-mgmt's control (the meta-Makefile and the bridged
crossbuild.mktemplate) to:The extra
-emakes every recipe invocation exit on first error by default. Recipes that already setset -ethemselves are unaffected; recipes relying on commands continuing past a failure now have to opt in explicitly withcmd || true.Test plan
cd provider-ci && make allpasses locally (Go unit tests, actionlint on regenerated test-providers, no unrelated diffs).scripts/crossbuild.mkdiffs match the template change (SHELL+.SHELLFLAGSswap, nothing else).Notes
Opened as draft for initial review. PR-field checklist (assignee, reviewers, milestone, project) will be filled once the diff is acked.
🤖 Generated with Claude Code