Fix colors not working on mod load failure (#734)

Move console mode set to beginning of StartServer to allow colors earlier in the console output

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
This commit is contained in:
DrakiaXYZ
2026-01-26 10:06:11 -08:00
committed by GitHub
parent b12c7ddbd0
commit c37a9f37eb
+1 -2
View File
@@ -93,6 +93,7 @@ public static class Program
public static async Task StartServer(string[] args) public static async Task StartServer(string[] args)
{ {
Console.OutputEncoding = Encoding.UTF8; Console.OutputEncoding = Encoding.UTF8;
SetConsoleOutputMode();
// Some users don't know how to create a shortcut... // Some users don't know how to create a shortcut...
if (!IsRunFromInstallationFolder()) if (!IsRunFromInstallationFolder())
@@ -157,8 +158,6 @@ public static class Program
forwardedHeadersOptions.KnownProxies.Clear(); forwardedHeadersOptions.KnownProxies.Clear();
app.UseForwardedHeaders(forwardedHeadersOptions); app.UseForwardedHeaders(forwardedHeadersOptions);
SetConsoleOutputMode();
await app.Services.GetRequiredService<SptServerStartupService>().Startup(); await app.Services.GetRequiredService<SptServerStartupService>().Startup();
await app.RunAsync(); await app.RunAsync();