fix: return a promise from yeoman callback style so it actually awaits
MODIFY
src/command_base.ts
src/command_base.ts
@@ -10,6 +10,11 @@ export default abstract class CommandBase extends Command {
`oclif:${type}`
)
- await env.run(`oclif:${type}`, generatorOptions)
+ await new Promise((resolve, reject) => {
+ env.run(`oclif:${type}`, generatorOptions, (err: Error, results: any) => {
+ if (err) reject(err)
+ else resolve(results)
+ })
+ })
}
}

fix: return a promise from yeoman callback style so it actually awaits (#43)