We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d43ca9 commit 5ffd5c5Copy full SHA for 5ffd5c5
packages/create-react-native-library/src/index.ts
@@ -403,7 +403,8 @@ async function create(argv: yargs.Arguments<any>) {
403
let valid = question.validate ? question.validate(String(value)) : true;
404
405
// We also need to guard against invalid choices
406
- if (valid && 'choices' in question) {
+ // If we don't already have a validation message to provide a better error
407
+ if (typeof valid !== 'string' && 'choices' in question) {
408
const choices =
409
typeof question.choices === 'function'
410
? question.choices(undefined, argv, question)
0 commit comments