Prevent Export-CSV from flushing with every input (#20282)

Removed StreamWriter flush from process block, the stream is flushed in the End block.
This commit is contained in:
Christopher Andrews
2023-09-18 21:59:15 +05:00
committed by GitHub
parent 6d23f72def
commit 8b1edaa496
@@ -320,7 +320,6 @@ namespace Microsoft.PowerShell.Commands
string csv = _helper.ConvertPSObjectToCSV(InputObject, _propertyNames);
WriteCsvLine(csv);
_sw.Flush();
}
/// <summary>
@@ -422,7 +421,6 @@ namespace Microsoft.PowerShell.Commands
{
if (_sw != null)
{
_sw.Flush();
_sw.Dispose();
_sw = null;
}