From ada5bf9db2c84874bd502d55feb4cb637379c916 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Mon, 9 Dec 2024 16:36:38 +0100 Subject: [PATCH] Hint about -e/--errors when CLI errors out Fixes #35953 --- .../main/java/io/quarkus/cli/common/OutputOptionMixin.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/devtools/cli/src/main/java/io/quarkus/cli/common/OutputOptionMixin.java b/devtools/cli/src/main/java/io/quarkus/cli/common/OutputOptionMixin.java index 50bb36be6c48f..1da00c356683b 100644 --- a/devtools/cli/src/main/java/io/quarkus/cli/common/OutputOptionMixin.java +++ b/devtools/cli/src/main/java/io/quarkus/cli/common/OutputOptionMixin.java @@ -162,6 +162,11 @@ public int handleCommandException(Exception ex, String message) { CommandLine.UnmatchedArgumentException.printSuggestions((CommandLine.ParameterException) ex, out()); } error(message); + + if (!isShowErrors()) { + info("\nAdd the -e/--errors option to get more information about the error. Add the --verbose option to get even more details."); + } + return cmd.getExitCodeExceptionMapper() != null ? cmd.getExitCodeExceptionMapper().getExitCode(ex) : mixee.exitCodeOnInvalidInput(); }