mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user