Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions packages/cli/src/commands/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -570,14 +570,16 @@ export default (async function initialize(

// From 0.75 it actually is useful to be able to specify both the template and react-native version.
// This should only be used by people who know what they're doing.
if (semver.gte(version, TEMPLATE_COMMUNITY_REACT_NATIVE_VERSION)) {
logger.warn(
`Use ${chalk.bold('--template')} and ${chalk.bold(
'--version',
)} only if you know what you're doing. Here be dragons 🐉.`,
);
} else if (!!options.template && !!options.version) {
throw new TemplateAndVersionError(options.template);
if (!!options.template && !!options.version) {
if (semver.gte(version, TEMPLATE_COMMUNITY_REACT_NATIVE_VERSION)) {
logger.warn(
`Use ${chalk.bold('--template')} and ${chalk.bold(
'--version',
)} only if you know what you're doing. Here be dragons 🐉.`,
);
} else {
throw new TemplateAndVersionError(options.template);
}
}

const root = process.cwd();
Expand Down