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
There are quite a few programs that return non-zero success exit codes. With the PSNativeCommandErrorActionPreference experimental feature turned on this causes errors to be emitted to the console.
I propose that a variable and/or cmdlet maintain a dictionary of program successful exit codes to be checked at runtime when a program runs a non-zero exit code. The dictionary could also be expanded to include error codes. Imagine a community module(s) with a set of programs and success/error exit codes with descriptions that PowerShell could leverage to return to the user.
Prerequisites
Steps to reproduce
There are quite a few programs that return non-zero success exit codes. With the
PSNativeCommandErrorActionPreferenceexperimental feature turned on this causes errors to be emitted to the console.I propose that a variable and/or cmdlet maintain a dictionary of program successful exit codes to be checked at runtime when a program runs a non-zero exit code. The dictionary could also be expanded to include error codes. Imagine a community module(s) with a set of programs and success/error exit codes with descriptions that PowerShell could leverage to return to the user.
A current example with brew:
Expected behavior
Programs that return successful non-zero exit codes; PowerShell does not write errors.Actual behavior
Errors are written on all non-zero exit codes.Error details
Environment data
Visuals
No response