respect testMode=false in development builds (#10376)

This commit is contained in:
Artemis Kearney 2023-05-16 13:53:12 -05:00 committed by GitHub
parent cf51701705
commit d199640fb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,10 @@ public final class Main {
logger.info("Logging level: " + logger.getEffectiveLevel());
logger.info("Default charset: " + Charset.defaultCharset());
String adminPassword = "";
// enable test mode by default for developer build (if you run it from source code)
testMode |= version.isDeveloperBuild();
for (String arg : args) {
if (arg.startsWith(testModeArg)) {
testMode = Boolean.parseBoolean(arg.replace(testModeArg, ""));
@ -98,9 +102,6 @@ public final class Main {
}
}
// enable test mode by default for developer build (if you run it from source code)
testMode |= version.isDeveloperBuild();
final String configPath = Optional.ofNullable(System.getProperty(configPathProp))
.orElse(defaultConfigPath);