Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ function createApp(
);

const useYarn = useNpm ? false : shouldUseYarn();
const yarnUsesDefaultRegistry =
execSync('yarn config get registry').toString() ===
'https://registry.yarnpkg.com';

const originalDirectory = process.cwd();
process.chdir(root);
if (!useYarn && !checkThatNpmCanReadCwd()) {
Expand Down Expand Up @@ -267,7 +271,7 @@ function createApp(
}
}

if (useYarn) {
if (useYarn && yarnUsesDefaultRegistry) {
fs.copySync(
require.resolve('./yarn.lock.cached'),
path.join(root, 'yarn.lock')
Expand Down