Skip to content

Commit 1541fc3

Browse files
authored
Check for null Path (#4391)
1 parent f9226d7 commit 1541fc3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Microsoft.TestPlatform.TestHostProvider/Hosting/DotnetTestHostManager.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,10 @@ private string GetTestHostPath(string runtimeConfigDevPath, string depsFilePath,
777777
}
778778
}
779779

780-
testHostPath = Path.Combine(testhostPackage.Path, testHostPath);
780+
if (testhostPackage.Path is not null)
781+
{
782+
testHostPath = Path.Combine(testhostPackage.Path, testHostPath);
783+
}
781784
_hostPackageVersion = testhostPackage.Version;
782785
IsVersionCheckRequired = !_hostPackageVersion.StartsWith("15.0.0");
783786
EqtTrace.Verbose("DotnetTestHostmanager: Relative path of testhost.dll with respect to package folder is {0}", testHostPath);

0 commit comments

Comments
 (0)