mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 20:15:07 +00:00
Add dry-run support across destructive commands (#516)
* chore: update contributors [skip ci] * Add dry-run support across destructive commands Implement dry-run for uninstall, purge, installer, touchid, completion, and remove flows.\nGuard side effects in uninstall path (launchctl, defaults writes, kill/brew actions), update help/README, and add coverage in CLI/Bats tests.\n\nValidation: ./scripts/check.sh and ./scripts/test.sh (452 tests, 0 failures, 8 skipped). * test(purge): keep dev-compatible purge coverage --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tw93 <hitw93@gmail.com>
This commit is contained in:
@@ -168,6 +168,11 @@ brew_uninstall_cask() {
|
||||
local cask_name="$1"
|
||||
local app_path="${2:-}"
|
||||
|
||||
if [[ "${MOLE_DRY_RUN:-0}" == "1" ]]; then
|
||||
debug_log "[DRY RUN] Would brew uninstall --cask --zap $cask_name"
|
||||
return 0
|
||||
fi
|
||||
|
||||
is_homebrew_available || return 1
|
||||
[[ -z "$cask_name" ]] && return 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user