Skip to content

Commit

Permalink
Cherry-pick #259
Browse files Browse the repository at this point in the history
  • Loading branch information
illicitonion committed May 2, 2024
1 parent 2c811b3 commit 5734512
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions java/gazelle/private/servermanager/servermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"sync"
"time"
Expand Down Expand Up @@ -92,11 +93,15 @@ func locateJavaparser() (string, error) {
}

// We want //java/src/com/github/bazel_contrib/contrib_rules_jvm/javaparser/generators:Main
loc, err := rf.Rlocation("contrib_rules_jvm/java/src/com/github/bazel_contrib/contrib_rules_jvm/javaparser/generators/Main")
javaparserPath := "contrib_rules_jvm/java/src/com/github/bazel_contrib/contrib_rules_jvm/javaparser/generators/Main"
if runtime.GOOS == "windows" {
javaparserPath += ".exe"
}
loc, err := rf.Rlocation(javaparserPath)

if err != nil {
return "", fmt.Errorf("failed to call RLocation: %w", err)
}

return loc, nil
}

Expand Down

0 comments on commit 5734512

Please sign in to comment.