Warn about long run time of init.
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 https://github.com/facebook/react-native/pull/9406 Differential Revision: D3716357 Pulled By: bestander fbshipit-source-id: 6a460c881a20b9edb1bd1c8c5df09e5a7e5020ed
This commit is contained in:
parent
5df9c67351
commit
1a683fa5e8
|
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue