fix an issue in getting GOPATH in generate_go.sh (#262)

This commit is contained in:
unconsolable 2021-06-21 19:35:52 +08:00 committed by GitHub
parent 7c8bc00a00
commit b4b7dca34f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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