1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 07:28:20 +08:00

Merge pull request #4678 from ipfs/fix/gopath-default

build: match Go's GOPATH defaults behaviour
This commit is contained in:
Whyrusleeping
2018-03-24 20:58:00 -07:00
committed by GitHub
2 changed files with 5 additions and 6 deletions

View File

@ -7,11 +7,6 @@ if [ -z "$PWD" ]; then
exit 1
fi
if [ -z "$GOPATH" ]; then
echo "GOPATH not set, you must have go configured properly to install ipfs"
exit 1
fi
while [ ${#} -gt 1 ]; do
if [ "$PWD" = "$2" ]; then
exit 0
@ -20,5 +15,5 @@ while [ ${#} -gt 1 ]; do
done
echo "go-ipfs must be built from within your \$GOPATH directory."
echo "expected within '$GOPATH' but got '$PWD'"
echo "expected within '$(go env GOPATH)' but got '$PWD'"
exit 1

View File

@ -1,12 +1,16 @@
# golang utilities
GO_MIN_VERSION = 1.9
# pre-definitions
GOCC ?= go
GOTAGS ?=
GOFLAGS ?=
GOTFLAGS ?=
# match Go's default GOPATH behaviour
export GOPATH ?= $(shell $(GOCC) env GOPATH)
DEPS_GO :=
TEST_GO :=
TEST_GO_BUILD :=