mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
Fix application crashes if there are two environment variables with same name, differing only in case (#67)
This commit is contained in:
@@ -206,7 +206,7 @@ namespace CliFx.Analyzers
|
||||
// Duplicate environment variable name
|
||||
var duplicateEnvironmentVariableNameOptions = options
|
||||
.Where(p => !string.IsNullOrWhiteSpace(p.EnvironmentVariableName))
|
||||
.GroupBy(p => p.EnvironmentVariableName, StringComparer.OrdinalIgnoreCase)
|
||||
.GroupBy(p => p.EnvironmentVariableName, StringComparer.Ordinal)
|
||||
.Where(g => g.Count() > 1)
|
||||
.SelectMany(g => g.AsEnumerable())
|
||||
.ToArray();
|
||||
|
||||
Reference in New Issue
Block a user