add confirmation for rules removal

This commit is contained in:
Joe Danziger
2025-05-11 16:09:42 -04:00
parent a949fe627d
commit 42a1484028
2 changed files with 43 additions and 1 deletions

View File

@@ -519,6 +519,17 @@ function registerCommands(programInstance) {
.flatMap((b) => b.split(',').map((s) => s.trim()))
.filter(Boolean);
if (action === 'remove') {
const ui = await import('./ui.js');
const confirmed = await ui.confirmRulesRemove(expandedBrands);
if (!confirmed) {
console.log(chalk.yellow('Aborted: No rules were removed.'));
return;
}
}
// (removed duplicate projectDir, brands check, and expandedBrands parsing)
const removalResults = [];
for (const brand of expandedBrands) {