While passing a json stream to a out file PS fails while cmd succeeds. Ending '}' bracket is missing.
# Steps to reproduce
1. I use a tool called rabtap to publish messages to rabbitMQ. Tool can be found here: https://github.com/jandelgado/rabtap
2. When I tap on an exchange and redirect output to a file.
-> It comes OK when I use this cmd on cmd prompt (i.e., as here): rabtap tap "myexchange:" --json > c:\tmp\usingCMDline.txt"
-> However if I redirect the output using powershell, I miss out the ending bracekt in the output file. rabtap tap "myexchange:" --json | Out-File "c:\tmp\ps02.txt" (see attached output)
# Expected behavior
Full JSON should output, as done by the cmd line redirect operator.
# Actual behavior
Miss out on the ending bracket.
More details on issues can be seen here: https://github.com/jandelgado/rabtap/issues/21
This looks like a bug on first sight but maybe there is a workaround that I am missing? Any idea why this is happening?
# Environment data