1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-25 23:21:54 +08:00

fix path sep on windows in check_go_path

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
This commit is contained in:
Steven Allen
2018-07-19 13:54:46 -07:00
parent 24832881dd
commit f90fffbdc8

View File

@ -7,7 +7,14 @@ PKG="$1"
DIR="$(pwd -P)"
GOPATH="$(go env GOPATH)"
while read -d ':' p; do
# The path separator is ; on windows.
if [ "$(go env GOOS)" = "windows" ]; then
PATHSEP=';'
else
PATHSEP=':'
fi
while read -d "$PATHSEP" p; do
if ! cd "$p/src/$PKG" 2>/dev/null; then
continue
fi