From ead521142f9495a4c1344c33332b60a75d387f2b Mon Sep 17 00:00:00 2001 From: Ioannis Canellos Date: Fri, 22 Sep 2023 16:34:11 +0300 Subject: [PATCH] fix: respect user provide description of cli plugin --- .../src/main/java/io/quarkus/cli/plugin/PluginManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/PluginManager.java b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/PluginManager.java index d230c9cabd3a7..aabcfa800b8ae 100644 --- a/independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/PluginManager.java +++ b/independent-projects/tools/devtools-common/src/main/java/io/quarkus/cli/plugin/PluginManager.java @@ -97,10 +97,11 @@ public Optional addPlugin(String nameOrLocation, boolean userCatalog, Op Map installablePlugins = state.installablePlugins(); Optional plugin = Optional.ofNullable(installablePlugins.get(name)).map(Plugin::inUserCatalog); return plugin.map(p -> { - PluginCatalog updatedCatalog = state.pluginCatalog(userCatalog).addPlugin(p); + Plugin withDescription = p.withDescription(description); + PluginCatalog updatedCatalog = state.pluginCatalog(userCatalog).addPlugin(withDescription); pluginCatalogService.writeCatalog(updatedCatalog); state.invalidateInstalledPlugins(); - return p; + return withDescription; }); }