Skip to content

Commit

Permalink
Fixes correct opensearch version when displaying the log
Browse files Browse the repository at this point in the history
Signed-off-by: Darshit Chanpura <dchanp@amazon.com>
  • Loading branch information
DarshitChanpura committed Dec 7, 2023
1 parent e66fc26 commit e96410c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ void setSecurityVariables() {

// Extract OpenSearch version and Security version
File[] opensearchLibFiles = new File(OPENSEARCH_LIB_PATH).listFiles(
pathname -> pathname.getName().startsWith("opensearch-") && pathname.getName().endsWith(".jar")
pathname -> pathname.getName().matches("opensearch-core-(.*).jar")
);

if (opensearchLibFiles != null && opensearchLibFiles.length > 0) {
OPENSEARCH_VERSION = opensearchLibFiles[0].getName().replaceAll("opensearch-(.*).jar", "$1");
OPENSEARCH_VERSION = opensearchLibFiles[0].getName().replaceAll("opensearch-core-(.*).jar", "$1");
}

File[] securityFiles = new File(OPENSEARCH_PLUGINS_DIR + "opensearch-security").listFiles(
Expand Down

0 comments on commit e96410c

Please sign in to comment.