File tree Expand file tree Collapse file tree
src/System.Management.Automation/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1718,7 +1718,11 @@ internal void Add(object input)
17181718
17191719 private void AddTextInput ( object input )
17201720 {
1721- Array formattedObjects = _pipeline . Process ( input ) ;
1721+ AddTextInputFromFormattedArray ( _pipeline . Process ( input ) ) ;
1722+ }
1723+
1724+ private void AddTextInputFromFormattedArray ( Array formattedObjects )
1725+ {
17221726 foreach ( var item in formattedObjects )
17231727 {
17241728 string line = PSObject . ToStringParser ( _command . Context , item ) ;
@@ -1821,7 +1825,7 @@ internal void Done()
18211825 // the calls are on the same thread, so there is no race condition.
18221826 if ( _pipeline != null )
18231827 {
1824- _pipeline . End ( ) ;
1828+ AddTextInputFromFormattedArray ( _pipeline . End ( ) ) ;
18251829 _pipeline . Dispose ( ) ;
18261830 _pipeline = null ;
18271831 }
You can’t perform that action at this time.
0 commit comments