From ed752f024ebf1149695df1cc862ec7e6e5b3b681 Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Sat, 27 Apr 2024 08:04:22 -0700 Subject: [PATCH] wip --- plop/commands/testCommand.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plop/commands/testCommand.ts b/plop/commands/testCommand.ts index 0d5cd09..703c3f7 100644 --- a/plop/commands/testCommand.ts +++ b/plop/commands/testCommand.ts @@ -61,8 +61,6 @@ export function testCommand(plop: NodePlopAPI) { const appHelperPath = join(appPath, `helper`) - const tgz = globSync(`gobot-*.tgz`, { cwd: appHelperPath })[0] - const { bot } = await getBot(slug) const shouldRun = async () => @@ -175,7 +173,14 @@ export function testCommand(plop: NodePlopAPI) { await exec(`gobot ${slug} ${args.join(',')}`)(answers, config, plop) return `${slug} run successful` }, - exec(`npm i -g ${tgz}`, { cwd: appHelperPath }), + async (answers, config, plop) => { + const tgz = globSync(`gobot-*.tgz`, { cwd: appHelperPath })[0] + return exec(`npm i -g ${tgz}`, { cwd: appHelperPath })( + answers, + config, + plop, + ) + }, async (answers, config, plop) => { if (!(await shouldRun())) return `${slug} is not available for platform. Skipping tgz bin alias exec`