4c29f5768d
When handling file redirection for CommandExpression, we don't call 'DoComplete' on the underlying PipelineProcessor of the FileRedirection object, and thus the EndProcessing method is not called on Out-File, which causes different behaviors between <expr> > out.txt and <expr> | Out-File out.txt. The fix is to make sure 'DoComplete' is called after the stream output has been written to the redirection pipe. Also fix another issue This PR also fixes an issue that could mess up restoring the original pipes. Here is the repro: PS> 1 *> b.txt > a.txt; 123 Cannot perform operation because object "PipelineProcessor" has already been disposed The root cause is that we don't always restore pipes in the correct order. Please see the code changes in Compiler.cs for more details. Fix #4812 |
||
---|---|---|
.. | ||
Ast.Tests.ps1 | ||
AutomaticVariables.Tests.ps1 | ||
BNotOperator.Tests.ps1 | ||
Conversions.Tests.ps1 | ||
ExtensibleCompletion.Tests.ps1 | ||
LanguageAndParser.TestFollowup.Tests.ps1 | ||
MethodInvocation.Tests.ps1 | ||
ParameterBinding.Tests.ps1 | ||
Parser.Tests.ps1 | ||
Parsing.Tests.ps1 | ||
RedirectionOperator.Tests.ps1 | ||
TypeAccelerator.Tests.ps1 | ||
UsingAssembly.Tests.ps1 | ||
UsingNamespace.Tests.ps1 |