From 78b41ecde4aa735f09252673fa40e7a79793d0a5 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:17:57 +1100 Subject: [PATCH 1/2] Allow bypass of SetConsoleOutputMode function --- SPTarkov.Server/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SPTarkov.Server/Program.cs b/SPTarkov.Server/Program.cs index c7a991c7..30f76f55 100644 --- a/SPTarkov.Server/Program.cs +++ b/SPTarkov.Server/Program.cs @@ -234,7 +234,7 @@ public static class Program private static void SetConsoleOutputMode() { - if (!OperatingSystem.IsWindows()) + if (!OperatingSystem.IsWindows() || Environment.GetEnvironmentVariable("DISABLE_VIRTUAL_TERMINAL") == "1") { return; } From 4cfc6a33384b0d81eb8e27453d59ed0fd5079721 Mon Sep 17 00:00:00 2001 From: Greelan <53196309+Greelan@users.noreply.github.com> Date: Thu, 16 Oct 2025 11:28:40 +1100 Subject: [PATCH 2/2] Improve environment variable check flexibility As per bot suggestion --- SPTarkov.Server/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SPTarkov.Server/Program.cs b/SPTarkov.Server/Program.cs index 30f76f55..e1836221 100644 --- a/SPTarkov.Server/Program.cs +++ b/SPTarkov.Server/Program.cs @@ -234,7 +234,9 @@ public static class Program private static void SetConsoleOutputMode() { - if (!OperatingSystem.IsWindows() || Environment.GetEnvironmentVariable("DISABLE_VIRTUAL_TERMINAL") == "1") + var disableFlag = Environment.GetEnvironmentVariable("DISABLE_VIRTUAL_TERMINAL"); + + if (!OperatingSystem.IsWindows() || disableFlag == "1" || string.Equals(disableFlag, "true", StringComparison.OrdinalIgnoreCase)) { return; }