Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function createApp(name, verbose, version) {

function shouldUseYarn() {
try {
execSync('yarn --version', {stdio: 'ignore'});
execSync('yarnpkg --version', {stdio: 'ignore'});
return true;
} catch (e) {
return false;
Expand All @@ -149,7 +149,7 @@ function install(packageToInstall, verbose, callback) {
var command;
var args;
if (shouldUseYarn()) {
command = 'yarn';
command = 'yarnpkg';
args = [ 'add', '--dev', '--exact', packageToInstall];
} else {
command = 'npm';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/eject.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ prompt(
if (pathExists.sync(paths.yarnLockFile)) {
console.log(cyan('Running yarn...'));
fs.removeSync(ownPath);
spawnSync('yarn', [], {stdio: 'inherit'});
spawnSync('yarnpkg', [], {stdio: 'inherit'});
} else {
console.log(cyan('Running npm install...'));
fs.removeSync(ownPath);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = function(appPath, appName, verbose, originalDirectory) {
var args;

if (useYarn) {
command = 'yarn';
command = 'yarnpkg';
args = ['add'];
} else {
command = 'npm';
Expand Down