New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async in validate throws UnhandledPromiseRejectionWarning when validation fails #845
Comments
can confirm ... |
(i am using "fs-extra": "^8.1.0")
always throws: |
doesn't work either ... |
This also happens if an exception is thrown from the |
Same error here |
Is there any changelog where we can check the changes made? |
Same error here , anyone can help? |
you can just return the error message。 validate: (input) => {
const pattern = new RegExp("^[a-zA-Z-\/]+$");
if (!pattern.test(input)) {
return '格式不正确, 请重新输入';
}
return;
} |
The problem occurs for async request only so this does not solve the issue |
I pushed a fix with Inquirer@7.0.1. Try it out and let me know if the issue persists. |
code:
result when answer is 10
node -v
v10.16.3
The text was updated successfully, but these errors were encountered: