mandiant / mandiant/VM-Packages
Helpers in uninstallation use Stop ErrorActionPreference
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 246
- Forks
- 98
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 7
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the first line of vm.common.psm1 and the ErrorActionPreference settings in the chocolateyuninstall.ps1 files. Trace how helpers such as VM-Uninstall handle errors and verify that errors are reported while the uninstallation continues through subsequent steps without requiring -ao 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100