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:
@@ -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}`));
|
||||
|
||||
Reference in New Issue
Block a user