If my command has a prompt and I'm using vorpal parse, I cannot get the prompt to display the question and the CLI finishes without any log or error which makes it harder to debug.
import vorpal from 'vorpal'
const cli = vorpal();
cli
.command('fakeCommand', 'This is just a demo')
.action(function (args, cb) {
this.prompt({
type: 'input',
name: 'basePath',
default: process.cwd(),
message: 'Destination folder (if empty, current folder will be used)?'
}, (result) => {
console.log('hi');
cb();
});
});
If my command has a prompt and I'm using vorpal parse, I cannot get the prompt to display the question and the CLI finishes without any log or error which makes it harder to debug.
This does not work
node cli.js fakeCommand
This works
node cli.js
fakeCommand