Skip to content

Commit

Permalink
Update gazelle.bash.in (bazel-contrib#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenmj authored and jeromep-stripe committed Mar 22, 2024
1 parent dbebd2e commit aee0d2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/gazelle.bash.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ REPO_CONFIG_PATH=@@REPO_CONFIG_PATH@@
# use the SDK used by the workspace in case the Go SDK is not installed
# on the host system or is a different version.
function set_goroot {
local gotool=$(rlocation "$GOTOOL")
local gotool
gotool=$(rlocation "$GOTOOL")
if [ -z "$gotool" ]; then
echo "$0: warning: could not locate GOROOT used by rules_go" >&2
return
fi
export GOROOT=$(cd "$(dirname "$gotool")/.."; pwd)
GOROOT=$(cd "$(dirname "$gotool")/.."; pwd)
export GOROOT
if type cygpath >/dev/null 2>&1; then
# On Windows, convert the path to something usable outside of bash.
GOROOT=$(cygpath -w "$GOROOT")
Expand Down

0 comments on commit aee0d2e

Please sign in to comment.