浏览代码

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.
Jason Tedor 9 年之前
父节点
当前提交
0f529e10a8

+ 1 - 1
core/src/main/java/org/elasticsearch/plugins/RemovePluginCommand.java

@@ -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<>();

+ 1 - 1
qa/evil-tests/src/test/java/org/elasticsearch/plugins/RemovePluginCommandTests.java

@@ -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);
     }
     }