-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configurable behavior on critical error: message on Error stream or pop-up dialog #16468
Comments
Thanks for opening the issue @sba923. I've created a simple repro and have verified behaviour in Windows PowerShell 2 on Windows 7, Windows PowerShell 5.1, and PowerShell 7.2. I have also checked the behaviour of cmd, the run dialog box, and git-bash. To expand on what is listed in above: PowerShell behaves the same as cmd and the run dialog when you use The repro steps I've used (from an administrative PowerShell window): choco install adb
Remove-Item "$env:ChocolateyInstall\lib\adb\tools\platform-tools\AdbWinApi.dll"
adb Note Chocolatey is not the only way to get adb installed, but it is a pretty quick and painless way to do it. |
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you. |
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes. |
Is there any solution for the required "pop up window" when running @daxian-dbw I'm confused. I don't see a solution for that. Could you please give a look? |
This should be reopened if you ask me 😜@StevenBucher98 @SteveL-MSFT |
Summary of the new feature / enhancement
When critical errors such as "cannot start EXE due to missing DLL" occur in File Explorer or CMD, an explanatory error dialog is displayed:
When the same kind of error occurs in PowerShell, no error message is displayed, only
$LASTEXITCODE
is set:It would be desirable to make this behavior configurable, so that especially in interactive scenarios the user is supplied with information about what's happening.
This inspired by MKS Korn Shell's
set -X
option (@BrucePay will remember...):From set KornShell flags and positional parameters:
Of course, that exception handler is not desirable for scripted / unattended execution, so it should be off by default.
It doesn't have to be a GUI-based one, outputting the explanatory text to the
Error
stream would also be fine.@corbob has collected repro steps on various shells.
Proposed technical implementation details (optional)
No response
The text was updated successfully, but these errors were encountered: