mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 20:56:02 +00:00
Fix PackageManagement issue in the latest Alpah12 on Linux (#2665)
* Registry.LocalMachine throws on non-windows platform. * address cr feedback
This commit is contained in:
commit
fe9064868e
1 file changed
+5
@@ -1037,10 +1037,15 @@ namespace Microsoft.PackageManagement.Internal.Implementation {
|
||||
throw new ArgumentNullException("request");
|
||||
}
|
||||
|
||||
#if CORECLR
|
||||
var providerAssemblies = Enumerable.Empty<string>();
|
||||
|
||||
#else
|
||||
//looks like registry needs to be here for supporting .msi packages
|
||||
var providerAssemblies = (_initialized ? Enumerable.Empty<string>() : _defaultProviders)
|
||||
.Concat(GetProvidersFromRegistry(Registry.LocalMachine, "SOFTWARE\\MICROSOFT\\PACKAGEMANAGEMENT"))
|
||||
.Concat(GetProvidersFromRegistry(Registry.CurrentUser, "SOFTWARE\\MICROSOFT\\PACKAGEMANAGEMENT"));
|
||||
#endif
|
||||
|
||||
#if !COMMUNITY_BUILD
|
||||
// todo: these should just be strong-named references. for now, just load them from the same directory.
|
||||
|
||||
Reference in new issue
Block a user