File tree 1 file changed +2
-11
lines changed
packages/react-scripts/scripts
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const spawn = require('react-dev-utils/crossSpawn');
22
22
const { defaultBrowsers } = require ( 'react-dev-utils/browsersHelper' ) ;
23
23
const os = require ( 'os' ) ;
24
24
const resolveFrom = require ( 'resolve-from' ) ;
25
+ const paths = require ( '../config/paths' ) ;
25
26
26
27
function isInGitRepository ( ) {
27
28
try {
@@ -75,15 +76,6 @@ function tryGitInit(appPath) {
75
76
}
76
77
}
77
78
78
- function isYarnAvailable ( ) {
79
- try {
80
- execSync ( 'yarnpkg --version' , { stdio : 'ignore' } ) ;
81
- return true ;
82
- } catch ( e ) {
83
- return false ;
84
- }
85
- }
86
-
87
79
module . exports = function (
88
80
appPath ,
89
81
appName ,
@@ -98,8 +90,7 @@ module.exports = function(
98
90
'..'
99
91
) ;
100
92
const appPackage = require ( path . join ( appPath , 'package.json' ) ) ;
101
- const useYarn =
102
- fs . existsSync ( path . join ( appPath , 'yarn.lock' ) ) || isYarnAvailable ( ) ;
93
+ const useYarn = paths . useYarn ;
103
94
104
95
// Copy over some of the devDependencies
105
96
appPackage . dependencies = appPackage . dependencies || { } ;
You can’t perform that action at this time.
0 commit comments