We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 77f8df7 commit 0454543Copy full SHA for 0454543
packages/create-react-app/createReactApp.js
@@ -217,6 +217,10 @@ function createApp(
217
);
218
219
const useYarn = useNpm ? false : shouldUseYarn();
220
+ const yarnUsesDefaultRegistry =
221
+ execSync('yarn config get registry').toString() ===
222
+ 'https://registry.yarnpkg.com';
223
+
224
const originalDirectory = process.cwd();
225
process.chdir(root);
226
if (!useYarn && !checkThatNpmCanReadCwd()) {
@@ -268,7 +272,7 @@ function createApp(
268
272
}
269
273
270
274
271
- if (useYarn) {
275
+ if (useYarn && yarnUsesDefaultRegistry) {
276
fs.copySync(
277
require.resolve('./yarn.lock.cached'),
278
path.join(root, 'yarn.lock')
0 commit comments