Fix absolute paths to dotnet (#597)

This commit is contained in:
Justin Kotalik 2018-02-20 15:03:37 -08:00 committed by GitHub
parent c395db12e6
commit ff496ca580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 9 deletions

View File

@ -188,15 +188,19 @@ HOSTFXR_UTILITY::GetHostFxrParameters(
{
// Check if hostfxr is in this folder, if it is, we are a standalone application,
// else we assume we received an absolute path to dotnet.exe
hr = GetStandaloneHostfxrParameters(
struExeLocation.QueryStr(),
pcwzApplicationPhysicalPath,
pcwzArguments,
hEventLog,
struHostFxrDllLocation,
pdwArgCount,
ppwzArgv);
goto Finished;
if (!struExeLocation.EndsWith(L"dotnet.exe") &&
!struExeLocation.EndsWith(L"dotnet"))
{
hr = GetStandaloneHostfxrParameters(
struExeLocation.QueryStr(),
pcwzApplicationPhysicalPath,
pcwzArguments,
hEventLog,
struHostFxrDllLocation,
pdwArgCount,
ppwzArgv);
goto Finished;
}
}
else
{