Skip to content
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

Helpers in uninstallation use Stop ErrorActionPreference #1033

Open
Ana06 opened this issue May 8, 2024 · 0 comments
Open

Helpers in uninstallation use Stop ErrorActionPreference #1033

Ana06 opened this issue May 8, 2024 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@Ana06
Copy link
Member

Ana06 commented May 8, 2024

Details

We are setting $ErrorActionPreference = 'Continue' in all chocolateyuninstall.ps1 files, but the helper functions seems to use the $ErrorActionPreference = 'Stop in the first line of vm.common.psm1. Some of our helper functions like VM-Uninstall are using -ao 0 to ignore errors (as otherwise they would fail the uninstall), while we would like to get the errors but not fail the uninstallation so that as many steps as possible are performed.

@Ana06 Ana06 added the 🐛 bug Something isn't working label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant