Fix plugin command name in remove plugin command
This commit fixes the name of the plugin command that is output when a user attempts to remove a plugin that does not exist.
This commit is contained in:
parent
4a52dc9a8c
commit
0f529e10a8
|
@ -71,7 +71,7 @@ class RemovePluginCommand extends SettingCommand {
|
||||||
|
|
||||||
Path pluginDir = env.pluginsFile().resolve(pluginName);
|
Path pluginDir = env.pluginsFile().resolve(pluginName);
|
||||||
if (Files.exists(pluginDir) == false) {
|
if (Files.exists(pluginDir) == false) {
|
||||||
throw new UserError(ExitCodes.USAGE, "Plugin " + pluginName + " not found. Run 'plugin list' to get list of installed plugins.");
|
throw new UserError(ExitCodes.USAGE, "plugin " + pluginName + " not found; run 'elasticsearch-plugin list' to get list of installed plugins");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Path> pluginPaths = new ArrayList<>();
|
List<Path> pluginPaths = new ArrayList<>();
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class RemovePluginCommandTests extends ESTestCase {
|
||||||
|
|
||||||
public void testMissing() throws Exception {
|
public void testMissing() throws Exception {
|
||||||
UserError e = expectThrows(UserError.class, () -> removePlugin("dne", home));
|
UserError e = expectThrows(UserError.class, () -> removePlugin("dne", home));
|
||||||
assertTrue(e.getMessage(), e.getMessage().contains("Plugin dne not found"));
|
assertTrue(e.getMessage(), e.getMessage().contains("plugin dne not found"));
|
||||||
assertRemoveCleaned(env);
|
assertRemoveCleaned(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue