build: fix: configure fails if GOPATH environment variable not set
If the GOPATH enviroment variable was not set, go uses the default
GOPATH (~/go/).
The configure script was only checking if the GOPATH environment
is set. If it wasn't the script was failing.
Instead of checking if the GOPATH environment variable is set, check if
"go env GOPATH" returns a non-emtpy string.
commit1c16c2c055bcd442c5c4f0fa6d4a85fd5d053a20
authorFabian Holler <fabian.holler@simplesurance.de>
dateMon 25 Feb 2019, 10:37 (8 years ago)
parent2280b42
configure+1
@@ -106,6 +106,7 @@ check_docker_version() {
106106
107107check_go_env() {
108108 echo -n "Checking \$GOPATH... "
109+ GOPATH="$(go env GOPATH)"
109110 if [ -z "$GOPATH" ]; then
110111 printf "${RED}invalid${NC} - GOPATH not set\n"
111112 exit 1