Skip to content

Commit

Permalink
Exit with an error code when npm/yarn install fails (#1224)
Browse files Browse the repository at this point in the history
Previously create-react-app exited with 0 after an installation error.
  • Loading branch information
fson authored Dec 10, 2016
1 parent 2e02e36 commit 0990ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/create-react-app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ function run(root, appName, version, verbose, originalDirectory) {
var packageToInstall = getInstallPackage(version);
var packageName = getPackageName(packageToInstall);

install(packageToInstall, verbose, function (code, command, args) {
install(packageToInstall, verbose, function(code, command, args) {
if (code !== 0) {
console.error('`' + command + ' ' + args.join(' ') + '` failed');
return;
process.exit(1);
}

checkNodeVersion(packageName);
Expand Down

0 comments on commit 0990ce0

Please sign in to comment.