Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Misleading error message when piping native command to throwing powershell #2803

Copy link
Copy link
@vors

Description

@vors
Issue body actions

Steps to reproduce

git | % {throw 1}  

git can be replaced to any native executable with non-empty standart output.

Expected behavior

Error with FullyQualifiedErrorId : 1, just like in throw 1 case.

Actual behavior

Error with FullyQualifiedErrorId : NativeCommandFailed

PS /> git | % {throw 1}                                                                                                                
Program 'git' failed to run: 1At line:1 char:1
+ git | % {throw 1}
+ ~~~.
At line:1 char:1
+ git | % {throw 1}
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedException
    + FullyQualifiedErrorId : NativeCommandFailed

Environment data

> $PSVersionTable
Name                           Value                                                                                                  
----                           -----                                                                                                  
PSVersion                      6.0.0-alpha                                                                                            
PSEdition                      Core                                                                                                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                
BuildVersion                   3.0.0.0                                                                                                
GitCommitId                    v6.0.0-alpha.13                                                                                        
CLRVersion                                                                                                                            
WSManStackVersion              3.0                                                                                                    
PSRemotingProtocolVersion      2.3                                                                                                    
SerializationVersion           1.1.0.1 
Name                           Value                                                                                                  
----                           -----                                                                                                  
PSVersion                      6.0.0-alpha                                                                                            
PSEdition                      Core                                                                                                   
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                
BuildVersion                   3.0.0.0                                                                                                
GitCommitId                    v6.0.0-alpha.11                                                                                        
CLRVersion                                                                                                                            
WSManStackVersion              3.0                                                                                                    
PSRemotingProtocolVersion      2.3                                                                                                    
SerializationVersion           1.1.0.1     

Note: it repros on both alpha.11 and alpha.13 so it's not a regression introduced in #2450

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.