From e3fa319a46fff2e0a192d1fc5f175d1e1dc47921 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Tue, 16 Jul 2024 21:44:44 -0400 Subject: [PATCH] Switch on nullable references for `Tgstation.Server.Host.Common` --- src/Tgstation.Server.Host.Common/DotnetHelper.cs | 3 +++ .../Tgstation.Server.Host.Common.csproj | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Tgstation.Server.Host.Common/DotnetHelper.cs b/src/Tgstation.Server.Host.Common/DotnetHelper.cs index b5d80db784..5945eac25d 100644 --- a/src/Tgstation.Server.Host.Common/DotnetHelper.cs +++ b/src/Tgstation.Server.Host.Common/DotnetHelper.cs @@ -21,6 +21,9 @@ namespace Tgstation.Server.Host.Common public static IEnumerable GetPotentialDotnetPaths(bool isWindows) { var enviromentPath = Environment.GetEnvironmentVariable("PATH"); + if (enviromentPath == null) + return Enumerable.Empty(); + var paths = enviromentPath.Split(';'); var exeName = "dotnet"; diff --git a/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj b/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj index a45edbc7c4..484d476684 100644 --- a/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj +++ b/src/Tgstation.Server.Host.Common/Tgstation.Server.Host.Common.csproj @@ -4,6 +4,7 @@ $(TgsFrameworkVersion);net2.0 $(TgsCoreVersion) + enable