Skip to content

Commit 0680fde

Browse files
committed
Revert interpolated string use in Get-Object so previous formatting behavior is preserved
1 parent e946b56 commit 0680fde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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.InvariantCulture, "{0}, ", item.ToString());
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.InvariantCulture, "{0}, ", propValuePropertyValue.ToString());
165165
}
166166
}
167167
}

0 commit comments

Comments
 (0)