Skip to content

Commit

Permalink
Update gazelle.bash.in (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
mortenmj authored Jan 4, 2024
1 parent 8fbf08c commit e7e69c4
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 e7e69c4

Please sign in to comment.