Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix yarnpkg alias usage in the init script #329

Merged
merged 1 commit into from
Jul 27, 2017
Merged
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
8 changes: 4 additions & 4 deletions react-native-scripts/src/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ https://github.com/npm/npm/issues/16991
let args = [];

if (useYarn) {
command = 'yarnpkg';
command = 'yarn';
} else {
command = 'npm';
args = ['install', '--save'];
Expand All @@ -126,9 +126,9 @@ https://github.com/npm/npm/issues/16991
log(`Installing dependencies using ${command}...`);
log(); // why is this here

if (command === 'yarnpkg') {
// it's weird to print a yarn alias that no one uses
command = 'yarn';
if (command === 'yarn') {
// Use the more unique `yarnpkg` alias to avoid naming conflicts with other tools.
command = 'yarnpkg';
}

const proc = spawn(command, args, { stdio: 'inherit' });
Expand Down