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

Make build exit with error code when interrupted #1496

Merged
merged 7 commits into from
Feb 11, 2017
Merged
Changes from 6 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
14 changes: 14 additions & 0 deletions packages/react-scripts/bin/react-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ case 'test':
[require.resolve('../scripts/' + script)].concat(args),
{stdio: 'inherit'}
);
if (result.signal) {
if (result.signal == 'SIGKILL') {
console.log(
'This probably means the system ran out of memory or someone called ' +
'`kill -9` on the process.'
);
} else if (result.signal == 'SIGTERM') {
console.log(
'Someone might have called `kill` or `killall`, or the system could ' +
'be shutting down.'
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's prepend both messages with The build failed because the process exited too early.
Otherwise the context is not clear.

process.exit(1);
}
process.exit(result.status);
break;
default:
Expand Down