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.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);
|
||||
|
|
|
@ -61,4 +61,11 @@ public class StartDevCommandDistTest {
|
|||
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.
|
||||
--help-all This same help message but with additional options.
|
||||
-v, --verbose Print out error details when running this command.
|
||||
|
||||
Cache:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in a new issue