From 1a683fa5e8680bd2a240bd665de14e146e0af18c Mon Sep 17 00:00:00 2001 From: Edward Delaporte Date: Mon, 15 Aug 2016 04:34:13 -0700 Subject: [PATCH] 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 --- react-native-cli/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react-native-cli/index.js b/react-native-cli/index.js index 5b9235680..f367fefa8 100755 --- a/react-native-cli/index.js +++ b/react-native-cli/index.js @@ -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(); }