File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,19 @@ functions:
73
73
fi
74
74
75
75
# Set actual PATH. PATH should contain binaries from GOROOT, GOPATH, GCC_PATH and mongodb.
76
- # Adding GOROOT's bin to PATH on Windows requires a cygpath conversion.
77
76
export GOROOTBIN="$GOROOT/bin"
77
+ export GOPATHBIN="$GOPATH/bin"
78
78
if [ "Windows_NT" = "$OS" ]; then
79
- export GOROOTBIN=$(cygpath -m $GOROOTBIN)
79
+ # Convert all Windows-style paths (e.g. C:/) to Bash-style Cygwin paths
80
+ # (e.g. /cygdrive/c/...) because PATH is interpreted by Bash, which uses ":" as a
81
+ # separator so doesn't support Windows-style paths. Other scripts or binaries that
82
+ # aren't part of Cygwin still need the environment variables to use Windows-style
83
+ # paths, so only convert them when setting PATH. Note that GCC_PATH is already a
84
+ # Bash-style Cygwin path for all Windows tasks.
85
+ export PATH="$(cygpath $GOROOTBIN):$(cygpath $GOPATHBIN):${GCC_PATH}:$(cygpath $MONGODB_BINARIES):$PATH"
86
+ else
87
+ export PATH="$GOROOTBIN:$GOPATHBIN:${GCC_PATH}:$MONGODB_BINARIES:$PATH"
80
88
fi
81
- export PATH="$GOROOTBIN:$GOPATH/bin:${GCC_PATH}:$MONGODB_BINARIES:$PATH"
82
89
83
90
# Check Go installation.
84
91
go version
You can’t perform that action at this time.
0 commit comments