First of all, amazing tool, thanks.
My prompt has 2 questions, second depends on the first, testing when I pass an option to the first one and the second is not necessary Im getting an error
saofile.js
prompts() {
return [
{
name: 'group',
message: 'Choose a group?',
type: 'list',
default: 'none',
choices: ['none', 'one', 'two']
},
{
name: 'newGroup',
message: 'New group name?',
default: 'Other',
when: ({ group }) => group === 'none',
required: true
}
]
},
Test file
const stream = await sao.mock(
{ generator },
{
group: 'one',
newGroup: 'Other'
}
)
Error
missing answer for required prompt: [object Object]