fix: adds --verbose to all commands (#25590)

closes #13250

Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
Steven Hawkins 2023-12-20 07:13:04 -05:00 committed by GitHub
parent 751cadc514
commit f633041db3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 28 additions and 2 deletions

View file

@ -21,12 +21,12 @@ import static org.keycloak.quarkus.runtime.cli.Picocli.NO_PARAM_LABEL;
import org.keycloak.quarkus.runtime.Environment;
import org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler;
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
import org.keycloak.quarkus.runtime.configuration.KeycloakPropertiesConfigSource;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.ScopeType;
@Command(name = "keycloak",
header = {
@ -87,7 +87,8 @@ public final class Main {
@Option(names = { "-v", "--verbose" },
description = "Print out error details when running this command.",
paramLabel = NO_PARAM_LABEL)
paramLabel = NO_PARAM_LABEL,
scope = ScopeType.INHERIT)
public void setVerbose(boolean verbose) {
ExecutionExceptionHandler exceptionHandler = (ExecutionExceptionHandler) spec.commandLine().getExecutionExceptionHandler();
exceptionHandler.setVerbose(verbose);

View file

@ -61,4 +61,11 @@ public class StartDevCommandDistTest {
cliResult.assertBuild();
}
@Test
@Launch({ "start-dev", "--verbose" })
void testVerboseAfterCommand(LaunchResult result) {
CLIResult cliResult = (CLIResult) result;
cliResult.assertStartedDevMode();
}
}

View file

@ -15,6 +15,7 @@ Options:
-h, --help This help message.
--help-all This same help message but with additional options.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -15,6 +15,7 @@ Options:
-h, --help This help message.
--help-all This same help message but with additional options.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -12,6 +12,7 @@ Options:
--help-all This same help message but with additional options.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -12,6 +12,7 @@ Options:
--help-all This same help message but with additional options.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -12,6 +12,7 @@ Options:
--help-all This same help message but with additional options.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -12,6 +12,7 @@ Options:
--help-all This same help message but with additional options.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -13,6 +13,7 @@ Options:
--help-all This same help message but with additional options.
--import-realm Import realms during startup by reading any realm configuration file from the
'data/import' directory.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -13,6 +13,7 @@ Options:
--help-all This same help message but with additional options.
--import-realm Import realms during startup by reading any realm configuration file from the
'data/import' directory.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -13,6 +13,7 @@ Options:
--help-all This same help message but with additional options.
--import-realm Import realms during startup by reading any realm configuration file from the
'data/import' directory.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -13,6 +13,7 @@ Options:
--help-all This same help message but with additional options.
--import-realm Import realms during startup by reading any realm configuration file from the
'data/import' directory.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Cache:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database:

View file

@ -14,6 +14,7 @@ Options:
'data/import' directory.
--optimized Use this option to achieve an optimal startup time if you have previously
built a server image using the 'build' command.
-v, --verbose Print out error details when running this command.
Database: