Skip to content

Commit

Permalink
fix: don't ask about defaults if language or type is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jul 1, 2024
1 parent 71f3874 commit 567aaaf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/create-react-native-library/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,14 @@ async function create(argv: yargs.Arguments<any>) {
...(await prompts(
Object.entries(questions)
.filter(([k, v]) => {
// Skip 'with-recommended-options' question if type of language is passed
if (
k === 'with-recommended-options' &&
(argv.languages || argv.type)
) {
return false;
}

// Skip questions which are passed as parameter and pass validation
if (argv[k] != null && v.validate?.(argv[k]) !== false) {
return false;
Expand Down

0 comments on commit 567aaaf

Please sign in to comment.