From b4b7dca34ff1ebefa0a5844f08424224c888b620 Mon Sep 17 00:00:00 2001 From: unconsolable Date: Mon, 21 Jun 2021 19:35:52 +0800 Subject: [PATCH] fix an issue in getting GOPATH in generate_go.sh (#262) --- proto/generate_go.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/generate_go.sh b/proto/generate_go.sh index 59f4cec6..5cc0481a 100755 --- a/proto/generate_go.sh +++ b/proto/generate_go.sh @@ -19,11 +19,11 @@ cmd_exists () { PROGRAM=$(basename "$0") -if [ -z $GOPATH ]; then +if [ -z $(go env GOPATH) ]; then printf "Error: the environment variable GOPATH is not set, please set it before running %s\n" $PROGRAM > /dev/stderr exit 1 fi - +GOPATH=$(go env GOPATH) GO_PREFIX_PATH=github.com/pingcap-incubator/tinykv/proto/pkg export PATH=$(pwd)/_tools/bin:$GOPATH/bin:$PATH