Skip to content

Commit 442d3a4

Browse files
Fix Group-Object so output uses current culture (#20608) (#20623)
1 parent d1fc83f commit 442d3a4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Microsoft.PowerShell.Commands.Utility/commands/utility/Group-Object.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,15 @@ private static string BuildName(List<ObjectCommandPropertyValue> propValues)
153153

154154
foreach (object item in propertyValueItems)
155155
{
156-
sb.Append(CultureInfo.InvariantCulture, $"{item}, ");
156+
sb.AppendFormat(CultureInfo.CurrentCulture, $"{item}, ");
157157
}
158158

159159
sb = sb.Length > length ? sb.Remove(sb.Length - 2, 2) : sb;
160160
sb.Append("}, ");
161161
}
162162
else
163163
{
164-
sb.Append(CultureInfo.InvariantCulture, $"{propValuePropertyValue}, ");
164+
sb.AppendFormat(CultureInfo.CurrentCulture, $"{propValuePropertyValue}, ");
165165
}
166166
}
167167
}

0 commit comments

Comments
 (0)