Skip to content

Commit

Permalink
Merge pull request #36097 from iocanel/cli-description-fix
Browse files Browse the repository at this point in the history
Respect user provided description of cli plugins
  • Loading branch information
aloubyansky authored Sep 26, 2023
2 parents 8a360ba + ead5211 commit c9c0d5a
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 c9c0d5a

Please sign in to comment.