mirror of
https://github.com/Smaug123/WoofWare.DotnetRuntimeLocator
synced 2025-10-05 07:18:40 +00:00
Permit overriding dotnet path (#96)
This commit is contained in:
@@ -188,7 +188,11 @@ public record DotnetEnvironmentInfo(
|
||||
/// <exception cref="Exception">Throws on any failure; handles nothing gracefully.</exception>
|
||||
public static DotnetEnvironmentInfo Get()
|
||||
{
|
||||
var dotnetExe = LocateDotnetExe();
|
||||
var dotnetExe = Environment.GetEnvironmentVariable("WOOFWARE_DOTNET_LOCATOR_DOTNET_EXE") switch
|
||||
{
|
||||
null => LocateDotnetExe(),
|
||||
var s => new FileInfo(s)
|
||||
};
|
||||
|
||||
// `null` can happen! Maybe we're self-contained.
|
||||
return GetSpecific(dotnetExe);
|
||||
|
Reference in New Issue
Block a user