Skip to content

Commit

Permalink
Warn about long run time of init.
Browse files Browse the repository at this point in the history
Summary:
I, like many before me, had to Google why react-native init appeared to hang the first time I tried it.

It turns out it can just take a really long time, but does not give any warning of this fact.

This patch provides such a warning.
Closes facebook#9406

Differential Revision: D3716357

Pulled By: bestander

fbshipit-source-id: 6a460c881a20b9edb1bd1c8c5df09e5a7e5020ed
  • Loading branch information
edthedev authored and Facebook Github Bot 3 committed Aug 15, 2016
1 parent 5df9c67 commit 1a683fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion react-native-cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ if (cli) {
);
process.exit(1);
} else {
if (!argv.verbose) console.log('This may take some time...');
init(commands[1], argv.verbose, argv.version);
}
break;
Expand Down Expand Up @@ -263,7 +264,7 @@ function checkForVersionArgument() {
try {
console.log('react-native: ' + require(REACT_NATIVE_PACKAGE_JSON_PATH()).version);
} catch (e) {
console.log('react-native: n/a - not inside a React Native project directory')
console.log('react-native: n/a - not inside a React Native project directory');
}
process.exit();
}
Expand Down

0 comments on commit 1a683fa

Please sign in to comment.