Skip to content

Commit

Permalink
Improving message if no commands is specify. Fix #7.
Browse files Browse the repository at this point in the history
Signed-off-by: Sun Tan <sutan@redhat.com>
  • Loading branch information
sunix committed Mar 19, 2021
1 parent 12eedfe commit de6200d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@

import io.quarkus.picocli.runtime.annotations.TopCommand;
import picocli.CommandLine;
import picocli.CommandLine.Spec;
import picocli.CommandLine.Model.CommandSpec;

@TopCommand
@CommandLine.Command(subcommands = { //
GenerateGoogleCalendarCommand.class, //
CreateMailCampaignCommand.class //
})
public class EventPublisher implements Runnable {
@Spec
CommandSpec spec;

@Override
public void run() {
System.out.println("hello ");
throw new CommandLine.ParameterException(spec.commandLine(), "No command argument specified. Please provide a command argument.");
}
}

0 comments on commit de6200d

Please sign in to comment.