Skip to content

Commit

Permalink
fix: respect user provide description of cli plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Sep 22, 2023
1 parent d98090e commit ead5211
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,11 @@ public Optional<Plugin> addPlugin(String nameOrLocation, boolean userCatalog, Op
Map<String, Plugin> installablePlugins = state.installablePlugins();
Optional<Plugin> 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;
});
}

Expand Down

0 comments on commit ead5211

Please sign in to comment.