mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Correcting the fix to work with inbox PS
This commit is contained in:
1 parent
0544bc2baf
commit
6f8794d835
1 file changed
+5
-3
@@ -1361,9 +1361,11 @@ namespace NativeMsh
|
||||
bool listEmpty = true;
|
||||
this->GetTrustedAssemblyList(hostEnvironment.GetCoreCLRDirectoryPath(), assemblyList, listEmpty);
|
||||
|
||||
// Fall back to attempt to load the CLR from the inbox location if
|
||||
// the configuration file pointed to an invalid directory.
|
||||
if (listEmpty)
|
||||
// Fall back to attempt to load the CLR from the alternate inbox location
|
||||
// or if the ALC was not located in the CoreCLR directory.
|
||||
std::string assemblyListToSearch = assemblyList.str();
|
||||
if (listEmpty ||
|
||||
(std::string::npos == assemblyListToSearch.rfind("Microsoft.PowerShell.CoreCLR.AssemblyLoadContext")))
|
||||
{
|
||||
char coreCLRPowerShellExtInstallPath[MAX_PATH];
|
||||
::ExpandEnvironmentStringsA(coreCLRPowerShellExtInstallDirectory, coreCLRPowerShellExtInstallPath, MAX_PATH);
|
||||
|
||||
Reference in new issue
Block a user