mandiant / mandiant/VM-Packages

Helpers in uninstallation use Stop ErrorActionPreference

Open Beginner friendly
#1,033 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:bug: bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.