Skip to content

Commit

Permalink
fix path sep on windows in check_go_path
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Steven Allen <[email protected]>
  • Loading branch information
Stebalien committed Jul 19, 2018
1 parent 2483288 commit f90fffb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bin/check_go_path
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f90fffb

Please sign in to comment.