Skip to content

Commit 0a2c71a

Browse files
authored
Revert changes to init script
We only run these commands for backward compat mode, in which we wouldn't receive the offline flag anyway
1 parent 3437e65 commit 0a2c71a

File tree

1 file changed

+2
-5
lines changed
  • packages/react-scripts/scripts

1 file changed

+2
-5
lines changed

packages/react-scripts/scripts/init.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var path = require('path');
1212
var spawn = require('cross-spawn');
1313
var chalk = require('chalk');
1414

15-
module.exports = function(appPath, appName, verbose, originalDirectory, template, isOnline) {
15+
module.exports = function(appPath, appName, verbose, originalDirectory, template) {
1616
var ownPackageName = require(path.join(__dirname, '..', 'package.json')).name;
1717
var ownPath = path.join(appPath, 'node_modules', ownPackageName);
1818
var appPackage = require(path.join(appPath, 'package.json'));
@@ -69,10 +69,7 @@ module.exports = function(appPath, appName, verbose, originalDirectory, template
6969

7070
if (useYarn) {
7171
command = 'yarnpkg';
72-
args = [
73-
'add',
74-
isOnline === false && '--offline'
75-
];
72+
args = ['add'];
7673
} else {
7774
command = 'npm';
7875
args = [

0 commit comments

Comments
 (0)