Skip to content

Commit

Permalink
chore: warn when extension mgr can't be used
Browse files Browse the repository at this point in the history
  • Loading branch information
iocanel committed Mar 29, 2023
1 parent e16c512 commit 613a080
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PluginMangerState {
Optional<QuarkusProject> quarkusProject,
Predicate<Plugin> pluginFilter) {
this.settings = settings;
this.output = output;
this.userHome = userHome;
this.quarkusProject = quarkusProject;
this.pluginFilter = pluginFilter;
Expand All @@ -38,6 +39,7 @@ class PluginMangerState {
}

private final PluginManagerSettings settings;
private final MessageWriter output;
private final PluginManagerUtil util;
private final Optional<Path> userHome;
private final Optional<Path> projectRoot;
Expand Down Expand Up @@ -186,8 +188,8 @@ public Map<String, Plugin> extensionPlugins() {
.filter(e -> installed.contains(e.getArtifact().getKey()))
.map(ExtensionProcessor::getCliPlugins).flatMap(Collection::stream).map(util::from)
.collect(Collectors.toMap(p -> p.getName(), p -> p.inProjectCatalog())));
} catch (Exception e) {
throw new RuntimeException("Error reading the extension catalog", e);
} catch (Exception ignore) {
output.warn("Failed to read the extension catalog. Ignoring extension plugins.");
}
});
return extensionPlugins;
Expand Down

0 comments on commit 613a080

Please sign in to comment.