From bac3c5cec878f336ed365b22bfbdb37c26fcd8b7 Mon Sep 17 00:00:00 2001 From: Kobi Samoray Date: Tue, 28 May 2024 12:31:19 +0300 Subject: [PATCH] Fix makefile error Make failed when GOPATH was set as it was overwritten in the make script. Used another name for output variable. Signed-off-by: Kobi Samoray --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index e308c6328..3e7626df3 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,7 +3,7 @@ GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor) WEBSITE_REPO=github.com/hashicorp/terraform-website PKG_NAME=nsxt GIT_COMMIT=$$(git rev-list -1 HEAD) -GOPATH=$$(go env GOPATH) +BUILD_PATH=$$(go env GOPATH) default: build @@ -16,7 +16,7 @@ build: fmtcheck go install -ldflags "-X github.com/vmware/terraform-provider-nsxt/nsxt.GitCommit=$(GIT_COMMIT)" build-coverage: - go build -cover -ldflags "-X github.com/vmware/terraform-provider-nsxt/nsxt.GitCommit=$(GIT_COMMIT)" -o $(GOPATH)/bin + go build -cover -ldflags "-X github.com/vmware/terraform-provider-nsxt/nsxt.GitCommit=$(GIT_COMMIT)" -o $(BUILD_PATH)/bin test: fmtcheck go test -i $(TEST) || exit 1