mirror of
https://github.com/status-im/react-native.git
synced 2025-02-03 21:24:31 +00:00
[cli] don't swallow require(local_cli) errors
This commit is contained in:
parent
f775bb0e05
commit
373c8777f6
9
react-native-cli/index.js
vendored
9
react-native-cli/index.js
vendored
@ -16,16 +16,17 @@ var CLI_MODULE_PATH = function() {
|
||||
process.cwd(),
|
||||
'node_modules',
|
||||
'react-native',
|
||||
'cli'
|
||||
'cli.js'
|
||||
);
|
||||
};
|
||||
|
||||
checkForVersionArgument();
|
||||
|
||||
var cli;
|
||||
try {
|
||||
cli = require(CLI_MODULE_PATH());
|
||||
} catch(e) {}
|
||||
var cliPath = CLI_MODULE_PATH();
|
||||
if (fs.existsSync(cliPath)) {
|
||||
cli = require(cliPath);
|
||||
}
|
||||
|
||||
if (cli) {
|
||||
cli.run();
|
||||
|
Loading…
x
Reference in New Issue
Block a user