We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
yarn.lock.cached
1 parent 3efcdbf commit d735a07Copy full SHA for d735a07
packages/create-react-app/createReactApp.js
@@ -268,10 +268,21 @@ function createApp(
268
}
269
270
if (useYarn) {
271
- fs.copySync(
272
- require.resolve('./yarn.lock.cached'),
273
- path.join(root, 'yarn.lock')
274
- );
+ let yarnUsesDefaultRegistry = true;
+ try {
+ yarnUsesDefaultRegistry =
+ execSync('yarnpkg config get registry')
275
+ .toString()
276
+ .trim() === 'https://registry.yarnpkg.com';
277
+ } catch (e) {
278
+ // ignore
279
+ }
280
+ if (yarnUsesDefaultRegistry) {
281
+ fs.copySync(
282
+ require.resolve('./yarn.lock.cached'),
283
+ path.join(root, 'yarn.lock')
284
+ );
285
286
287
288
run(
0 commit comments