Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
benallfree committed Apr 27, 2024
1 parent f214784 commit ed752f0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions plop/commands/testCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () =>
Expand Down Expand Up @@ -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`
Expand Down

0 comments on commit ed752f0

Please sign in to comment.