mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
enhance: add KC_ env variables for verbose and .sh options (#41847)
* enhance: add KC_ env variables for verbose and .sh options closes: #19213 Signed-off-by: Steve Hawkins <shawkins@redhat.com> Signed-off-by: Peter Zaoral <pepo48@gmail.com> Co-authored-by: Peter Zaoral <pepo48@gmail.com>
This commit is contained in:
parent
75078e0af8
commit
03b5753c84
26
quarkus/dist/src/main/content/bin/kc.bat
vendored
26
quarkus/dist/src/main/content/bin/kc.bat
vendored
@ -140,16 +140,30 @@ if not "x%JAVA_OPTS_APPEND%" == "x" (
|
||||
set JAVA_OPTS=%JAVA_OPTS% %JAVA_OPTS_APPEND%
|
||||
)
|
||||
|
||||
if NOT "x%DEBUG%" == "x" (
|
||||
set DEBUG_MODE=%DEBUG%
|
||||
if NOT "x%KC_DEBUG%" == "x" (
|
||||
set DEBUG_MODE=%KC_DEBUG%
|
||||
) else (
|
||||
if NOT "x%DEBUG%" == "x" (
|
||||
set DEBUG_MODE=%DEBUG%
|
||||
)
|
||||
)
|
||||
|
||||
if NOT "x%DEBUG_PORT%" == "x" (
|
||||
set DEBUG_PORT_VAR=%DEBUG_PORT%
|
||||
if NOT "x%KC_DEBUG_PORT%" == "x" (
|
||||
set DEBUG_PORT_VAR=%KC_DEBUG_PORT%
|
||||
set DEBUG_ADDRESS=0.0.0.0:!DEBUG_PORT_VAR!
|
||||
) else (
|
||||
if NOT "x%DEBUG_PORT%" == "x" (
|
||||
set DEBUG_PORT_VAR=%DEBUG_PORT%
|
||||
set DEBUG_ADDRESS=0.0.0.0:!DEBUG_PORT_VAR!
|
||||
)
|
||||
)
|
||||
|
||||
if NOT "x%DEBUG_SUSPEND%" == "x" (
|
||||
set DEBUG_SUSPEND_VAR=%DEBUG_SUSPEND%
|
||||
if NOT "x%KC_DEBUG_SUSPEND%" == "x" (
|
||||
set DEBUG_SUSPEND_VAR=%KC_DEBUG_SUSPEND%
|
||||
) else (
|
||||
if NOT "x%DEBUG_SUSPEND%" == "x" (
|
||||
set DEBUG_SUSPEND_VAR=%DEBUG_SUSPEND%
|
||||
)
|
||||
)
|
||||
|
||||
rem Set debug settings if not already set
|
||||
|
||||
6
quarkus/dist/src/main/content/bin/kc.sh
vendored
6
quarkus/dist/src/main/content/bin/kc.sh
vendored
@ -41,9 +41,9 @@ SERVER_OPTS="$SERVER_OPTS -Dpicocli.disable.closures=true"
|
||||
SERVER_OPTS="$SERVER_OPTS -Dquarkus-log-max-startup-records=10000"
|
||||
CLASSPATH_OPTS="'$(abs_path "../lib/quarkus-run.jar")'"
|
||||
|
||||
DEBUG_MODE="${DEBUG:-false}"
|
||||
DEBUG_PORT="${DEBUG_PORT:-8787}"
|
||||
DEBUG_SUSPEND="${DEBUG_SUSPEND:-n}"
|
||||
DEBUG_MODE="${KC_DEBUG:-${DEBUG:-false}}"
|
||||
DEBUG_PORT="${KC_DEBUG_PORT:-${DEBUG_PORT:-8787}}"
|
||||
DEBUG_SUSPEND="${KC_DEBUG_SUSPEND:-${DEBUG_SUSPEND:-n}}"
|
||||
DEBUG_ADDRESS="0.0.0.0:$DEBUG_PORT"
|
||||
|
||||
esceval() {
|
||||
|
||||
@ -88,7 +88,8 @@ public final class Main {
|
||||
@Option(names = { "-v", "--verbose" },
|
||||
description = "Print out error details when running this command.",
|
||||
paramLabel = NO_PARAM_LABEL,
|
||||
scope = ScopeType.INHERIT)
|
||||
scope = ScopeType.INHERIT,
|
||||
defaultValue = "${env:KC_VERBOSE}")
|
||||
public void setVerbose(boolean verbose) {
|
||||
ExecutionExceptionHandler exceptionHandler = (ExecutionExceptionHandler) spec.commandLine().getExecutionExceptionHandler();
|
||||
exceptionHandler.setVerbose(verbose);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user