Skip to content
This repository was archived by the owner on May 18, 2020. It is now read-only.

Install plugin with --batch option in Elasticsearch 5.x or later #59

Merged
merged 1 commit into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ private String[] prepareInstallCommand(File pluginManager, Plugin plugin) {
if (installationDescription.versionIs1x() && plugin.expressionIsUrl()) {
return new String[]{pluginManager.getAbsolutePath(), "--install", plugin.getPluginName(), "--url", plugin.getExpression()};
}
return new String[]{pluginManager.getAbsolutePath(), "install", plugin.getExpression()};
if (installationDescription.versionIs1x() || installationDescription.versionIs2x()) {
return new String[]{pluginManager.getAbsolutePath(), "install", plugin.getExpression()};
}
return new String[]{pluginManager.getAbsolutePath(), "install", "--batch", plugin.getExpression()};
}

private File pluginManagerExecutable() throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ boolean versionIs1x() {
return getVersion().startsWith("1.");
}

boolean versionIs2x() {
return getVersion().startsWith("2.");
}

boolean isCleanInstallationDirectoryOnStop() {
return cleanInstallationDirectoryOnStop;
}
Expand Down