You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.
Inquirer allows for the prompt's validate function to be asynchronous, however, when Plop prompt-bypass function calls the validator for the prompt, it does not allow for this and expects all validators to return a boolean or string.
Example
plop.setGenerator('user', {
description: 'Add a new user',
prompts: [
{
name: 'username',
message: 'What is the user name?',
type: 'input',
validate: async (input) => {
// do something async, returning either a boolean or string;
},
},
],
actions: []
})
Calling with plop user works, but plop user thisismissem fails with [ERROR] [object Promise]
The text was updated successfully, but these errors were encountered:
Inquirer allows for the prompt's validate function to be asynchronous, however, when Plop prompt-bypass function calls the validator for the prompt, it does not allow for this and expects all validators to return a
boolean
orstring
.Example
Calling with
plop user
works, butplop user thisismissem
fails with[ERROR] [object Promise]
The text was updated successfully, but these errors were encountered: