From 610f6814da9278025a71f429d7c1669e6397ed87 Mon Sep 17 00:00:00 2001 From: William Brafford Date: Mon, 10 Feb 2020 11:05:36 -0500 Subject: [PATCH] Remove unnecessary dirname command (#51968) (#52089) The elasticsearch-env script changes the working directory to ES_HOME, so we can just use bin/elasticsearch-keystore to invoke the keystore. --- distribution/src/bin/elasticsearch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/src/bin/elasticsearch b/distribution/src/bin/elasticsearch index e45bdb1ad22..6b484333af4 100755 --- a/distribution/src/bin/elasticsearch +++ b/distribution/src/bin/elasticsearch @@ -38,7 +38,7 @@ fi unset KEYSTORE_PASSWORD KEYSTORE_PASSWORD= if [[ $CHECK_KEYSTORE = true ]] \ - && "`dirname "$0"`"/elasticsearch-keystore has-passwd --silent + && bin/elasticsearch-keystore has-passwd --silent then if ! read -s -r -p "Elasticsearch keystore password: " KEYSTORE_PASSWORD ; then echo "Failed to read keystore password on console" 1>&2