Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0990ce0

Browse filesBrowse files
authored
Exit with an error code when npm/yarn install fails (facebook#1224)
Previously create-react-app exited with 0 after an installation error.
1 parent 2e02e36 commit 0990ce0
Copy full SHA for 0990ce0

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎packages/create-react-app/index.js

Copy file name to clipboardExpand all lines: packages/create-react-app/index.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ function run(root, appName, version, verbose, originalDirectory) {
142142
var packageToInstall = getInstallPackage(version);
143143
var packageName = getPackageName(packageToInstall);
144144

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

151151
checkNodeVersion(packageName);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.