Skip to content

Commit d409f13

Browse files
committed
Merge pull request facebook#3241 from vjeux/warning_cli
[cli] Add a big warning to stop people from modifying the global cli
2 parents ad622f2 + cfd19bb commit d409f13

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

react-native-cli/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,38 @@
11
#!/usr/bin/env node
22

33
/**
4-
* Copyright 2004-present Facebook. All Rights Reserved.
4+
* Copyright (c) 2015-present, Facebook, Inc.
5+
* All rights reserved.
6+
*
7+
* This source code is licensed under the BSD-style license found in the
8+
* LICENSE file in the root directory of this source tree. An additional grant
9+
* of patent rights can be found in the PATENTS file in the same directory.
510
*/
611

12+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
// /!\ DO NOT MODIFY THIS FILE /!\
14+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
//
16+
// react-native-cli is installed globally on people's computers. This means
17+
// that it is extremely difficult to have them upgrade the version and
18+
// because there's only one global version installed, it is very prone to
19+
// breaking changes.
20+
//
21+
// The only job of react-native-cli is to init the repository and then
22+
// forward all the commands to the local version of react-native.
23+
//
24+
// If you need to add a new command, please add it to local-cli/.
25+
//
26+
// The only reason to modify this file is to add more warnings and
27+
// troubleshooting information for the `react-native init` command.
28+
//
29+
// Do not make breaking changes! We absolutely don't want to have to
30+
// tell people to update their global version of react-native-cli.
31+
//
32+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
// /!\ DO NOT MODIFY THIS FILE /!\
34+
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35+
736
'use strict';
837

938
var fs = require('fs');

0 commit comments

Comments
 (0)