Skip to content

Need better way to work with native exes that report progress on stderr #3132

@rkeithhill

Description

@rkeithhill

Steps to reproduce

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:

image

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:

image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions