diff --git a/src/commands/template/install/index.ts b/src/commands/template/install/index.ts index d5f3cfa..af1fbf4 100644 --- a/src/commands/template/install/index.ts +++ b/src/commands/template/install/index.ts @@ -19,7 +19,7 @@ class Install extends Command { { title: 'Install', async task(ctx, _task) { - const [, ...packageNameList] = ctx._; + const packageNameList = ctx._.splice(2); if (packageNameList.length === 0) { return; } diff --git a/src/commands/template/uninstall/index.ts b/src/commands/template/uninstall/index.ts index 69ab4f3..e96e5ac 100644 --- a/src/commands/template/uninstall/index.ts +++ b/src/commands/template/uninstall/index.ts @@ -18,7 +18,7 @@ class Uninstall extends Command { { title: 'Uninstall', async task(ctx, _task) { - const [, ...packageNameList] = ctx._; + const packageNameList = ctx._.splice(2); if (packageNameList.length === 0) { return; }