Skip to content

Commit 74bd11f

Browse files
authored
Merge pull request #5221 from nawazkh/Makefile_update
check for google project silently
2 parents e591f24 + d2f0955 commit 74bd11f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,11 @@ SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
147147
KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST) use --use-env -p path $(KUBEBUILDER_ENVTEST_KUBERNETES_VERSION))
148148

149149
# Define Docker related variables. Releases should modify and double check these vars.
150-
ifneq (,$(shell command -v gcloud))
151-
ifneq (,$(shell gcloud config get-value project))
152-
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
153-
endif
150+
ifneq ($(shell command -v gcloud),)
151+
GCLOUD_PROJECT := $(shell gcloud config get-value project 2>/dev/null)
152+
ifneq ($(GCLOUD_PROJECT),)
153+
REGISTRY ?= gcr.io/$(GCLOUD_PROJECT)
154+
endif
154155
endif
155156

156157
# If REGISTRY is not set, default to localhost:5000 to use the kind registry.

0 commit comments

Comments
 (0)