From cea3c3c92f8c5ae97d5b5310e18addefe32269fd Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Sun, 3 Apr 2016 23:23:25 -0400 Subject: [PATCH] Quote path to java binary This commit quotes the variable that contains the path to the java binary. Without these quotes, when the arguments to eval are evaluated the existing quotes will be removed leading to unquoted use of the path to the java binary. If this path contains spaces, evaluation will fail. --- distribution/src/main/resources/bin/elasticsearch-plugin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/src/main/resources/bin/elasticsearch-plugin b/distribution/src/main/resources/bin/elasticsearch-plugin index 1bab4b1118c..f686ed054f2 100755 --- a/distribution/src/main/resources/bin/elasticsearch-plugin +++ b/distribution/src/main/resources/bin/elasticsearch-plugin @@ -110,4 +110,4 @@ fi HOSTNAME=`hostname | cut -d. -f1` export HOSTNAME -eval "$JAVA" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"$ES_HOME/lib/*\"" org.elasticsearch.plugins.PluginCli $args +eval "\"$JAVA\"" -client -Delasticsearch -Des.path.home="\"$ES_HOME\"" $properties -cp "\"$ES_HOME/lib/*\"" org.elasticsearch.plugins.PluginCli $args