Removes usage of DOTNET_HOME in CLI repo.
DOTNET_HOME is no longer required, though it is a documented override, so this change removes all unnecessary references to DOTNET_HOME from the CLI Repo.
This commit is contained in:
parent
f81ba05a7c
commit
e625cbcf7a
13 changed files with 7 additions and 64 deletions
|
@ -133,23 +133,9 @@ namespace Microsoft.DotNet.Tools.Run
|
|||
}
|
||||
}
|
||||
|
||||
// Locate the runtime
|
||||
string dotnetHome = Environment.GetEnvironmentVariable("DOTNET_HOME");
|
||||
if (string.IsNullOrEmpty(dotnetHome))
|
||||
{
|
||||
// Use the runtime deployed with the tools, if present
|
||||
var candidateBase = Path.Combine(AppContext.BaseDirectory, "..");
|
||||
var candidate = Path.Combine(candidateBase, "runtime/coreclr");
|
||||
if (File.Exists(Path.Combine(candidate, Constants.LibCoreClrName)))
|
||||
{
|
||||
dotnetHome = Path.GetFullPath(candidateBase);
|
||||
}
|
||||
}
|
||||
|
||||
result = Command.Create(outputName, _args)
|
||||
.ForwardStdOut()
|
||||
.ForwardStdErr()
|
||||
.EnvironmentVariable("DOTNET_HOME", dotnetHome)
|
||||
.Execute()
|
||||
.ExitCode;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue