You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Need better way to work with native exes that report progress on stderr #3132
Today if you use an executable like git.exe (which uses stderr for progress not just errors), in the PowerShell console stderr appears like stdout (no ErrorRecords). In ISE, stderr is converted to ErrorRecords and displays in red. RE git.exe using stderr to report progress see http://git.661346.n2.nabble.com/git-push-output-goes-into-stderr-td6758028.html
This leads to less than a desirable user experience in ISE:
The above looks like an error but it is just git reporting progress i.e. that it switched to the branch.
Expected behavior
I would like a way to configure an app like git.exe to behave in a host that handles stderr like ISE does, to instead behave like the console. So the same command looks like this:
Also, it might be useful if a script or module had a way to query the host (or settings for a particular exe) to determine how its stderr is being handled.
Actual behavior
The progress output sent to stderr by Git is displayed as an error when it is NOT an error. I have a feeling this may be even more common in the Linux world so it would be good to have a more flexible "stderr handling" strategy than the current one.
Environment data
Name Value
---------
PSVersion 5.1.14393.693
PSEdition Desktop
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
BuildVersion 10.0.14393.693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Untested and needs verification - but I believe #2450 should address hosts like the ISE and remoting that do not handle stderr like the console host. Maybe sergei (@vors) can chime in to confirm.
Of course, that means these changes need to be pulled back into Windows for the ISE to pick it up.
Activity
joeyaiello commentedon Feb 11, 2017
Oh, interesting. So like a PowerShell variable that lets you either redirect stderr into the PowerShell Error stream or not.
Something like
$PSRedirectErrors = $Trueor the negative$PSPassthruError = $True?lzybkr commentedon Feb 11, 2017
Untested and needs verification - but I believe #2450 should address hosts like the ISE and remoting that do not handle stderr like the console host. Maybe sergei (@vors) can chime in to confirm.
Of course, that means these changes need to be pulled back into Windows for the ISE to pick it up.
vors commentedon Feb 11, 2017
Jason is correct, but it's a different PR: #1599
vors commentedon Feb 11, 2017
Duplicate of #1465