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

Propagate exit code > 1 out of failing hooks #768

Merged
merged 2 commits into from May 22, 2018

Conversation

lox
Copy link
Contributor

@lox lox commented May 16, 2018

Closes #754.

@lox lox added the wip label May 16, 2018
@lox lox force-pushed the hooks-should-propagate-exit-codes branch from 609c12d to d79ba66 Compare May 18, 2018 04:11
@lox lox requested review from keithpitt and ticky May 18, 2018 04:14
@ticky
Copy link
Contributor

ticky commented May 18, 2018

Cool, so if I’m reading this right, this will propagate back up to if phaseError != nil { in func (b *Bootstrap) Start() int and thus expose the true exit code! Looks good to me :D

Are we able to add test coverage for this behaviour? :)

Copy link
Member

@keithpitt keithpitt left a comment

Choose a reason for hiding this comment

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

Good catch, yeah a sneaky test if you can! (hopefully it's not too in the depths to be able to craft one, otherwise, it's probably fine without one)

@lox
Copy link
Contributor Author

lox commented May 21, 2018

I spent about a day trying to get the tests to work. I'll have another shot.

@lox lox removed the wip label May 22, 2018
@lox lox force-pushed the hooks-should-propagate-exit-codes branch from 5b3b870 to eb8df09 Compare May 22, 2018 02:25
@lox lox merged commit d480564 into master May 22, 2018
@lox lox deleted the hooks-should-propagate-exit-codes branch May 22, 2018 03:31
@ticky
Copy link
Contributor

ticky commented May 22, 2018

Nice! Good stuff 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants