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:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user