Skip to content

Commit

Permalink
Fix casing
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink committed Jun 6, 2022
1 parent 84efee3 commit 39a1ce7
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,19 @@ public virtual TestProcessStartInfo GetTestHostProcessStartInfo(
if (testHostExeFound)
{
const string prefix = "VSTEST_WINAPPHOST_";
const string DOTNET_ROOT = nameof(DOTNET_ROOT);
string vstestDotnetRootEnvName = $"{prefix}{DOTNET_ROOT}(x86)";
const string dotnetRoot = "DOTNET_ROOT";
string vstestDotnetRootEnvName = $"{prefix}{dotnetRoot}(x86)";
var vstestDotnetRootEnvValue = _environmentVariableHelper.GetEnvironmentVariable(vstestDotnetRootEnvName);
if (vstestDotnetRootEnvValue is null)
{
vstestDotnetRootEnvName = $"{prefix}{DOTNET_ROOT}";
vstestDotnetRootEnvName = $"{prefix}{dotnetRoot}";
vstestDotnetRootEnvValue = _environmentVariableHelper.GetEnvironmentVariable(vstestDotnetRootEnvName);
}

if (vstestDotnetRootEnvValue != null)
{
string dotnetRootEnvName = Version.Parse(_targetFramework.Version) >= Version6_0
? $"{DOTNET_ROOT}_{_architecture.ToString().ToUpperInvariant()}"
? $"{dotnetRoot}_{_architecture.ToString().ToUpperInvariant()}"
: vstestDotnetRootEnvName.Replace(prefix, string.Empty);

EqtTrace.Verbose($"DotnetTestHostmanager.LaunchTestHostAsync: Found '{vstestDotnetRootEnvName}' in env variables, value '{vstestDotnetRootEnvValue}', forwarding to '{dotnetRootEnvName}' (target framework is {_targetFramework.Name}, Version={_targetFramework.Version}).");
Expand Down

0 comments on commit 39a1ce7

Please sign in to comment.