Commit 0990ce08 authored by Ville Immonen's avatar Ville Immonen Committed by GitHub
Browse files

Exit with an error code when npm/yarn install fails (#1224)

Previously create-react-app exited with 0 after an installation error.
parent 2e02e36b
No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment