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

Exit with non-zero status if command fails #10

merged 1 commit into from Aug 6, 2019


Copy link

commented Aug 6, 2019

When using --min-coverage, tscov will exit with a non-zero status code when the minimum coverage isn't met. This works great with CI runners that use program exit status to determine if the build should be red or green.

.then(success => {
if (!success && !this.suppressError) {

This comment has been minimized.

Copy link

josh Aug 6, 2019

Author Contributor

I wasn't sure if the process exit should happen here or be hoisted up one caller. It's a little odd that a constructor would terminate a program. Though, it appears to be how it's designed when other errors happen.

See L34 of this file.

if (!this.suppressError) {

This comment has been minimized.

Copy link

jeroenouw Aug 6, 2019


Thanks for contributing!

@jeroenouw jeroenouw merged commit bb0370e into jeroenouw:master Aug 6, 2019

@josh josh deleted the josh:exit-status branch Aug 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.