fix bug in Makefile enabling Go Race Detector in make run (#88687)

fix bug in Makefile that always enables Go Race Detector when run with make run
pull/88705/head
Diego Augusto Molina 1 year ago committed by GitHub
parent d4c28aa757
commit 62b3983d08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      Makefile

@ -12,7 +12,7 @@ GO = go
GO_VERSION = 1.22.3
GO_FILES ?= ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/...
SH_FILES ?= $(shell find ./scripts -name *.sh)
GO_RACE := $(shell [ -n "$(GO_BUILD_DEV)$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
GO_RACE := $(shell [ -n "$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
GO_RACE_FLAG := $(if $(GO_RACE),-race)
GO_BUILD_FLAGS += $(if $(GO_BUILD_DEV),-dev)
GO_BUILD_FLAGS += $(if $(GO_BUILD_TAGS),-build-tags=$(GO_BUILD_TAGS))

Loading…
Cancel
Save