File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,11 @@ SETUP_ENVTEST_PKG := sigs.k8s.io/controller-runtime/tools/setup-envtest
147
147
KUBEBUILDER_ASSETS ?= $(shell $(SETUP_ENVTEST ) use --use-env -p path $(KUBEBUILDER_ENVTEST_KUBERNETES_VERSION ) )
148
148
149
149
# 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
154
155
endif
155
156
156
157
# If REGISTRY is not set, default to localhost:5000 to use the kind registry.
You can’t perform that action at this time.
0 commit comments