From d199640fb521e946de41da884e6100b1732b52d5 Mon Sep 17 00:00:00 2001 From: Artemis Kearney Date: Tue, 16 May 2023 13:53:12 -0500 Subject: [PATCH] respect `testMode=false` in development builds (#10376) --- Mage.Server/src/main/java/mage/server/Main.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Mage.Server/src/main/java/mage/server/Main.java b/Mage.Server/src/main/java/mage/server/Main.java index a559c287f5..dfe64ab26a 100644 --- a/Mage.Server/src/main/java/mage/server/Main.java +++ b/Mage.Server/src/main/java/mage/server/Main.java @@ -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);