-
Notifications
You must be signed in to change notification settings - Fork 102
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
Propagate build process status #2041
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,13 @@ export function buildScript(argv: { [name: string]: string }, cwd: string) { | |
fecLogger(LogType.error, err); | ||
process.exit(1); | ||
}); | ||
subprocess.on('exit', (code: string | null, signal: string) => { | ||
subprocess.on('exit', (code: number | null, signal: string) => { | ||
if (code) { | ||
fecLogger(LogType.error, 'Exited with code', code); | ||
process.exit(code); | ||
} else if (signal) { | ||
fecLogger(LogType.error, 'Exited with signal', signal); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we want to exit here as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. probably, would you have a recomendation for a code to exit with? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a tough one. I think it should be 1 TBH. Build should never receive any signals. A signal means an intentional interrupt of the build. So Error it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1 it is ;) |
||
process.exit(1); | ||
} else { | ||
fecLogger(LogType.info, 'Exited Okay'); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks more logical and also according to https://nodejs.org/api/child_process.html#event-exit it seems correct