diff --git a/Makefile b/Makefile index 303d9909d2..018ad6f97c 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,11 @@ endif # bingo manages consistent tooling versions for things like kind, kustomize, etc. include .bingo/Variables.mk +# Setting SHELL to bash allows bash commands to be executed by recipes. +# Options are set to exit when a recipe line exits non-zero or a piped command fails. +SHELL := /usr/bin/env bash -o pipefail +.SHELLFLAGS := -ec + # By default setup-envtest will write to $XDG_DATA_HOME, or $HOME/.local/share if that is not defined. # If $HOME is not set, we need to specify a binary directory to prevent an error in setup-envtest. # Useful for some CI/CD environments that set neither $XDG_DATA_HOME nor $HOME. @@ -19,7 +24,6 @@ ifeq ($(shell [[ $$HOME == "" || $$HOME == "/" ]] && [[ $$XDG_DATA_HOME == "" ]] SETUP_ENVTEST_BIN_DIR_OVERRIDE += --bin-dir /tmp/envtest-binaries endif -SHELL := /bin/bash ORG := github.com/operator-framework PKG := $(ORG)/operator-lifecycle-manager MOD_FLAGS := -mod=vendor -buildvcs=false