From 1dd7a27568e6d4d1438bcb849f210960bf02dbdf Mon Sep 17 00:00:00 2001 From: Crawcik Date: Thu, 14 Sep 2023 23:19:36 +0200 Subject: [PATCH] Checking for executable --- Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs b/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs index 4b430702f..66b578693 100644 --- a/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs +++ b/Source/Tools/Flax.Build/Build/DotNet/DotNetSdk.cs @@ -448,9 +448,9 @@ namespace Flax.Build { if (File.Exists("/etc/dotnet/install_location")) // Officialy recommended dotnet location file return File.ReadAllText("/etc/dotnet/install_location").Trim(); - if (Directory.Exists("/usr/share/dotnet")) // Officialy recommended dotnet location + if (File.Exists("/usr/share/dotnet/dotnet")) // Officialy recommended dotnet location return"/usr/share/dotnet"; - if (Directory.Exists("/usr/lib/dotnet")) // Deprecated recommended dotnet location + if (File.Exists("/usr/lib/dotnet/dotnet")) // Deprecated recommended dotnet location return "/usr/lib/dotnet"; if (Environment.GetEnvironmentVariable("PATH") is string globalBinPath) // Searching for dotnet binary return globalBinPath.Split(':').FirstOrDefault(x => File.Exists(Path.Combine(x, "dotnet")));