From 19434281e96434f223a673507730fe416304308b Mon Sep 17 00:00:00 2001 From: Alberto Pose Date: Wed, 13 May 2026 17:03:46 +0100 Subject: [PATCH] Use canonical SHELL + .SHELLFLAGS instead of the shorthand `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) --- provider-ci/Makefile | 3 ++- provider-ci/internal/pkg/templates/base/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/aws/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/cloudflare/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/docker/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/eks/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/pulumiservice/scripts/crossbuild.mk | 3 ++- .../test-providers/terraform-module/scripts/crossbuild.mk | 3 ++- provider-ci/test-providers/xyz/scripts/crossbuild.mk | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/provider-ci/Makefile b/provider-ci/Makefile index 8c09937d97..abbdc15cb3 100644 --- a/provider-ci/Makefile +++ b/provider-ci/Makefile @@ -1,4 +1,5 @@ -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c NAME ?= all PROVIDERS := $(patsubst %/, %, $(wildcard providers/*/)) PROVIDER_REPOS := $(addsuffix /repo, $(PROVIDERS)) diff --git a/provider-ci/internal/pkg/templates/base/scripts/crossbuild.mk b/provider-ci/internal/pkg/templates/base/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/internal/pkg/templates/base/scripts/crossbuild.mk +++ b/provider-ci/internal/pkg/templates/base/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/aws/scripts/crossbuild.mk b/provider-ci/test-providers/aws/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/aws/scripts/crossbuild.mk +++ b/provider-ci/test-providers/aws/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/cloudflare/scripts/crossbuild.mk b/provider-ci/test-providers/cloudflare/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/cloudflare/scripts/crossbuild.mk +++ b/provider-ci/test-providers/cloudflare/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/docker/scripts/crossbuild.mk b/provider-ci/test-providers/docker/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/docker/scripts/crossbuild.mk +++ b/provider-ci/test-providers/docker/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/eks/scripts/crossbuild.mk b/provider-ci/test-providers/eks/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/eks/scripts/crossbuild.mk +++ b/provider-ci/test-providers/eks/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/pulumiservice/scripts/crossbuild.mk b/provider-ci/test-providers/pulumiservice/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/pulumiservice/scripts/crossbuild.mk +++ b/provider-ci/test-providers/pulumiservice/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/terraform-module/scripts/crossbuild.mk b/provider-ci/test-providers/terraform-module/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/terraform-module/scripts/crossbuild.mk +++ b/provider-ci/test-providers/terraform-module/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?= diff --git a/provider-ci/test-providers/xyz/scripts/crossbuild.mk b/provider-ci/test-providers/xyz/scripts/crossbuild.mk index 83d5cb3ab8..23e9ef66a9 100644 --- a/provider-ci/test-providers/xyz/scripts/crossbuild.mk +++ b/provider-ci/test-providers/xyz/scripts/crossbuild.mk @@ -1,6 +1,7 @@ # Provider cross-platform build & packaging -SHELL := /bin/bash -o pipefail +SHELL := /bin/bash +.SHELLFLAGS := -eo pipefail -c # Set these variables to enable signing of the windows binary with Azure Trusted Signing. AZURE_SIGNING_CLIENT_ID ?=