From 68be95ca1ac457b49184bb81e11ad5cdb661cbb3 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 2 Jul 2015 13:16:20 -0400 Subject: [PATCH] Don't add CWD to classpath when ES_CLASSPATH isn't set. --- core/bin/elasticsearch.in.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/bin/elasticsearch.in.sh b/core/bin/elasticsearch.in.sh index af68857e0eb..9e1c8d9d42e 100644 --- a/core/bin/elasticsearch.in.sh +++ b/core/bin/elasticsearch.in.sh @@ -1,6 +1,12 @@ #!/bin/sh -ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*" +CORE_CLASSPATH="$ES_HOME/lib/${project.build.finalName}.jar:$ES_HOME/lib/*:$ES_HOME/lib/sigar/*" + +if [ "x$ES_CLASSPATH" = "x" ]; then + ES_CLASSPATH="$CORE_CLASSPATH" +else + ES_CLASSPATH="$ES_CLASSPATH:$CORE_CLASSPATH" +fi if [ "x$ES_MIN_MEM" = "x" ]; then ES_MIN_MEM=${packaging.elasticsearch.heap.min}