chocolatey / chocolatey/choco

Feature to abort if chocolateyBeforeModify.ps1 fail

Open
#1,731 8 comments 1 reaction 0 assignees View on GitHub
0 - Backlog Enhancement
Dominant language
C#
Stars
11.5k
Forks
961
PR merge metrics
No merged PRs in 30d

Description

This is a feature request. This can be a breaking change.

According to https://github.com/chocolatey/choco/issues/268#issuecomment-120752274 it's designed not to fail the build in case the script is bad. However this rarely happens, and we can make use of `--force` in both `choco upgrade` and `choco uninstall`. Therefore, I propose that error in `chocolateyBeforeModify.ps1` should fail the action, unless `-f`/`--force` is used.

Contributor guide

Open the contributing guide

Research direction

Start by locating the choco upgrade and choco uninstall entry points that process chocolateyBeforeModify.ps1, then trace how -f/--force is handled. Done means an error in the script aborts both actions by default, while --force allows the operation to continue.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.