浏览代码

Remove unnecessary dirname command (#51968)

The elasticsearch-env script changes the working directory to ES_HOME,
so we can just use bin/elasticsearch-keystore to invoke the keystore.
William Brafford 5 年之前
父节点
当前提交
af5fba8a70
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      distribution/src/bin/elasticsearch

+ 1 - 1
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