Skip to content

Commit

Permalink
Option to use ZOOKEEPER_PATH env var to find fatjar
Browse files Browse the repository at this point in the history
  • Loading branch information
dougm committed Dec 11, 2013
1 parent db981d0 commit bf122f0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion zk/server_java.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ var jarSearchPaths = []string{
}

func findZookeeperFatJar() string {
for _, path := range jarSearchPaths {
var paths []string
zkPath := os.Getenv("ZOOKEEPER_PATH")
if zkPath == "" {
paths = jarSearchPaths
} else {
paths = []string{filepath.Join(zkPath, "contrib/fatjar/zookeeper-*-fatjar.jar")}
}
for _, path := range paths {
matches, _ := filepath.Glob(path)
// TODO: could sort by version and pick latest
if len(matches) > 0 {
Expand Down

0 comments on commit bf122f0

Please sign in to comment.