Skip to content

Commit

Permalink
Avoid resolving plugin command after the first option
Browse files Browse the repository at this point in the history
Otherwise things like:
quarkus extension -i -s rest
triggers the plugin manager.
  • Loading branch information
gsmet committed Mar 12, 2024
1 parent 7215b28 commit 1bed8f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devtools/cli/src/main/java/io/quarkus/cli/QuarkusCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ public Optional<String> checkMissingCommand(CommandLine root, String[] args) {
missingCommand.append(currentParseResult.commandSpec().name());

List<String> unmatchedSubcommands = currentParseResult.unmatched().stream()
.filter(u -> !u.startsWith("-")).collect(Collectors.toList());
.takeWhile(u -> !u.startsWith("-"))
.collect(Collectors.toList());
if (!unmatchedSubcommands.isEmpty()) {
missingCommand.append("-").append(unmatchedSubcommands.get(0));
return Optional.of(missingCommand.toString());
Expand Down

0 comments on commit 1bed8f0

Please sign in to comment.