fix(cli): kept marketplace uninstall scope positional

The earlier dry-run change moved scope into an options object, silently
ignoring the legacy uninstallPlugin(id, "user") runtime shape still reachable
from compiled or plain-JS callers. Restore scope as the positional second
argument and carry dryRun in a trailing options bag, preserving the existing
call shape while keeping the non-mutating dry-run path.

Fixes #8178
This commit is contained in:
roboomp
2026-08-10 18:09:53 +00:00
parent 15a9346c29
commit b7d83ed931
6 changed files with 14 additions and 16 deletions
+2 -2
View File
@@ -482,7 +482,7 @@ async function handleUninstall(
if (flags.dryRun) {
if (viaMarketplace) {
try {
await mktMgr.uninstallPlugin(name, { scope: flags.scope, dryRun: true });
await mktMgr.uninstallPlugin(name, flags.scope, { dryRun: true });
} catch (err) {
console.error(chalk.red(`${theme.status.error} Failed to uninstall ${name}: ${err}`));
process.exit(1);
@@ -508,7 +508,7 @@ async function handleUninstall(
if (viaMarketplace) {
// Exact match against installed marketplace plugin IDs (name@marketplace)
try {
await mktMgr.uninstallPlugin(name, { scope: flags.scope });
await mktMgr.uninstallPlugin(name, flags.scope);
console.log(chalk.green(`${theme.status.success} Uninstalled ${name}`));
} catch (err) {
console.error(chalk.red(`${theme.status.error} Failed to uninstall ${name}: ${err}`));