From 047d8f4f311d94f53d7378edd832d38c05121481 Mon Sep 17 00:00:00 2001 From: Sunil Arora Date: Thu, 20 Dec 2018 11:28:30 -0800 Subject: [PATCH] :bug: report error if GOPATH env is missing fixes #531 #359 --- pkg/scaffold/project/makefile.go | 3 +++ test/project/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/pkg/scaffold/project/makefile.go b/pkg/scaffold/project/makefile.go index 72ef193b0b7..e755e7ad6bc 100644 --- a/pkg/scaffold/project/makefile.go +++ b/pkg/scaffold/project/makefile.go @@ -89,6 +89,9 @@ vet: # Generate code generate: +ifndef GOPATH + $(error GOPATH not defined, please define GOPATH. Run "go help gopath" to learn more about GOPATH) +endif go generate ./pkg/... ./cmd/... # Build the docker image diff --git a/test/project/Makefile b/test/project/Makefile index 17e8f98e893..ffde418d820 100644 --- a/test/project/Makefile +++ b/test/project/Makefile @@ -39,6 +39,9 @@ vet: # Generate code generate: +ifndef GOPATH + $(error GOPATH not defined, please define GOPATH. Run "go help gopath" to learn more about GOPATH) +endif go generate ./pkg/... ./cmd/... # Build the docker image