Skip to content

Commit 91aaeec

Browse files
authored
Use already installed helm from PATH in Makefile (#980)
1 parent e75ece7 commit 91aaeec

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,17 @@ CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
159159
controller-gen:
160160
$(call go-install-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/[email protected])
161161

162+
# Try to use already installed helm from PATH
163+
ifeq (ok,$(shell test -f "$$(which helm)" && echo ok))
164+
HELM=$(shell which helm)
165+
else
166+
HELM=/usr/bin/local/helm
167+
endif
168+
162169
# Download helm locally if necessary
163-
HELM = /usr/local/bin/helm
164170
helm:
165171
$(call install-helm)
166172

167-
168173
define install-helm
169174
@[ -f $(HELM) ] || { \
170175
set -e ;\

0 commit comments

Comments
 (0)