Closed ajansveld closed 5 years ago
FYI - I have been running with the _output.Add(item)
line removed for several months; it fixes the issue and I have seen no negative side effects.
I just wanted some way to get host output from the job. Otherwise it is lost. I suppose we could make it an option.
It looks like the Information stream handling was fixed in #30. Can we now remove the _output.Add(item)
line (at least for psVersion.Major >= 5
)?
Yeah, I think it can be removed. It was always just a hack to try and capture host writes.
Fixed in version 2.0.0.
Messages originating from Write-Host or $Host.UI.WriteLine() are sent to the Output stream, which results in Receive-Job sending them to the pipeline:
This seems to originate from this code:
Not sure what the proper fix is, perhaps this can be removed?