Skip to content

Commit

Permalink
fix: explicitly set makefile shell to bash (#881)
Browse files Browse the repository at this point in the history
Some of our make targets use bash syntax, which requires for the shell
used by make to be bash. Make uses sh by default, so the shell should be
set explicitly here. This was a gotcha before, because some systems
replace sh with bash. Explicitly setting the shell should help avoid
future gotchas.
  • Loading branch information
sdowell authored Sep 14, 2023
1 parent 163d105 commit fd864d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

REPO := kpt.dev/configsync

# Some of our recipes use bash syntax, so explicitly set the shell to bash.
SHELL := /bin/bash

# List of dirs containing go code owned by Nomos
NOMOS_CODE_DIRS := pkg cmd e2e
NOMOS_GO_PKG := $(foreach dir,$(NOMOS_CODE_DIRS),./$(dir)/...)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ HELM := $(BIN_DIR)/helm
# Builds the image if it does not exist to enable testing with a new image
# version before publishing.
pull-buildenv:
@docker image inspect $(BUILDENV_IMAGE) \
@docker image inspect $(BUILDENV_IMAGE) &> /dev/null \
|| docker pull $(BUILDENV_IMAGE) || $(MAKE) build-buildenv

build-buildenv: build/buildenv/Dockerfile
Expand Down

0 comments on commit fd864d9

Please sign in to comment.