From ef698962e2d8517daceae5b59d093d8ccad6f8ea Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 23 Mar 2020 17:04:51 -0700 Subject: [PATCH 1/2] Allow case insensitive comparison of paths for determining PSModulePath --- .../engine/Modules/ModuleIntrinsics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs index feb511d109e..da978c7d4bf 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs @@ -1250,7 +1250,7 @@ internal static string GetWindowsPowerShellModulePath() } // PowerShell specific paths including if set in powershell.config.json file we want to exclude - var excludeModulePaths = new HashSet { + var excludeModulePaths = new HashSet (StringComparer.OrdinalIgnoreCase) { GetPersonalModulePath(), GetSharedModulePath(), GetPSHomeModulePath(), From a3f8bd150476875d7d1bdca37d2dbb4de32cb7c3 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Mon, 23 Mar 2020 18:06:08 -0700 Subject: [PATCH 2/2] Address codefactor issue --- .../engine/Modules/ModuleIntrinsics.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs index da978c7d4bf..012b7a8d2fb 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs @@ -1250,7 +1250,7 @@ internal static string GetWindowsPowerShellModulePath() } // PowerShell specific paths including if set in powershell.config.json file we want to exclude - var excludeModulePaths = new HashSet (StringComparer.OrdinalIgnoreCase) { + var excludeModulePaths = new HashSet(StringComparer.OrdinalIgnoreCase) { GetPersonalModulePath(), GetSharedModulePath(), GetPSHomeModulePath(),