fix: adds --verbose to all commands (#25590)
closes #13250 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
This commit is contained in:
parent
751cadc514
commit
f633041db3
20 changed files with 28 additions and 2 deletions
|
@ -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.Environment;
|
||||||
import org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler;
|
import org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler;
|
||||||
import org.keycloak.quarkus.runtime.configuration.KeycloakConfigSourceProvider;
|
|
||||||
import org.keycloak.quarkus.runtime.configuration.KeycloakPropertiesConfigSource;
|
import org.keycloak.quarkus.runtime.configuration.KeycloakPropertiesConfigSource;
|
||||||
|
|
||||||
import picocli.CommandLine;
|
import picocli.CommandLine;
|
||||||
import picocli.CommandLine.Command;
|
import picocli.CommandLine.Command;
|
||||||
import picocli.CommandLine.Option;
|
import picocli.CommandLine.Option;
|
||||||
|
import picocli.CommandLine.ScopeType;
|
||||||
|
|
||||||
@Command(name = "keycloak",
|
@Command(name = "keycloak",
|
||||||
header = {
|
header = {
|
||||||
|
@ -87,7 +87,8 @@ public final class Main {
|
||||||
|
|
||||||
@Option(names = { "-v", "--verbose" },
|
@Option(names = { "-v", "--verbose" },
|
||||||
description = "Print out error details when running this command.",
|
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) {
|
public void setVerbose(boolean verbose) {
|
||||||
ExecutionExceptionHandler exceptionHandler = (ExecutionExceptionHandler) spec.commandLine().getExecutionExceptionHandler();
|
ExecutionExceptionHandler exceptionHandler = (ExecutionExceptionHandler) spec.commandLine().getExecutionExceptionHandler();
|
||||||
exceptionHandler.setVerbose(verbose);
|
exceptionHandler.setVerbose(verbose);
|
||||||
|
|
|
@ -61,4 +61,11 @@ public class StartDevCommandDistTest {
|
||||||
cliResult.assertBuild();
|
cliResult.assertBuild();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@Launch({ "start-dev", "--verbose" })
|
||||||
|
void testVerboseAfterCommand(LaunchResult result) {
|
||||||
|
CLIResult cliResult = (CLIResult) result;
|
||||||
|
cliResult.assertStartedDevMode();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ Options:
|
||||||
|
|
||||||
-h, --help This help message.
|
-h, --help This help message.
|
||||||
--help-all This same help message but with additional options.
|
--help-all This same help message but with additional options.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,7 @@ Options:
|
||||||
|
|
||||||
-h, --help This help message.
|
-h, --help This help message.
|
||||||
--help-all This same help message but with additional options.
|
--help-all This same help message but with additional options.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--import-realm Import realms during startup by reading any realm configuration file from the
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--import-realm Import realms during startup by reading any realm configuration file from the
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--import-realm Import realms during startup by reading any realm configuration file from the
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ Options:
|
||||||
--help-all This same help message but with additional 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
|
--import-realm Import realms during startup by reading any realm configuration file from the
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Cache:
|
Cache:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ Options:
|
||||||
'data/import' directory.
|
'data/import' directory.
|
||||||
--optimized Use this option to achieve an optimal startup time if you have previously
|
--optimized Use this option to achieve an optimal startup time if you have previously
|
||||||
built a server image using the 'build' command.
|
built a server image using the 'build' command.
|
||||||
|
-v, --verbose Print out error details when running this command.
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue