From 15052900da4112fa7cc9a1d11bee0d8b55f264ef Mon Sep 17 00:00:00 2001 From: Richard Hua Date: Thu, 11 Apr 2024 12:15:09 -0700 Subject: [PATCH] Handle case where mockgen is not installed --- dev/up | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/up b/dev/up index f3d02ffd..8247ba0a 100755 --- a/dev/up +++ b/dev/up @@ -8,7 +8,7 @@ if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi if ! which shellcheck &>/dev/null; then brew install shellcheck; fi if ! which protoc &>/dev/null; then brew install protobuf; fi if ! which protoc-gen-go &>/dev/null; then go install google.golang.org/protobuf/cmd/protoc-gen-go@latest; fi -if [ `mockgen --version` != "v0.4.0" ]; then go install go.uber.org/mock/mockgen@v0.4.0; fi +if ! which mockgen &>/dev/null || [ `mockgen --version` != "v0.4.0" ]; then go install go.uber.org/mock/mockgen@v0.4.0; fi if ! which protolint &>/dev/null; then go install github.com/yoheimuta/protolint/cmd/protolint@latest; fi dev/generate