mirror of
https://github.com/status-im/react-native.git
synced 2025-01-09 17:15:54 +00:00
ec76271715
Summary: When used in automation, `wrong-react-native` can cause problems because it does not report the issue via exit code. Closes https://github.com/facebook/react-native/pull/5114 Reviewed By: svcscm Differential Revision: D2799995 Pulled By: frantic fb-gh-sync-id: 23c32dac9b0fcdbeaf48b94e9cb220c6c1b344aa
20 lines
581 B
JavaScript
Executable File
20 lines
581 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
console.error([
|
|
'\033[31mLooks like you installed react-native globally, maybe you meant react-native-cli?',
|
|
'To fix the issue, run:\033[0m',
|
|
'npm uninstall -g react-native',
|
|
'npm install -g react-native-cli'
|
|
].join('\n'));
|
|
|
|
process.exit(1);
|