From 79b1464022b786d48cf9767294a1f047df0299f0 Mon Sep 17 00:00:00 2001 From: Aditya Patwardhan Date: Wed, 25 Mar 2020 12:11:06 -0700 Subject: [PATCH] Allow case insensitive paths for determining `PSModulePath` (#12192) * Allow case insensitive comparison of paths for determining PSModulePath * 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 feb511d109..012b7a8d2f 100644 --- a/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs +++ b/src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs @@ -1250,7 +1250,7 @@ namespace System.Management.Automation } // 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(),