-
Notifications
You must be signed in to change notification settings - Fork 555
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
Abort if the command for run
fails and exit_on_failure?
is true
#651
Conversation
#649 is needed to fix the error on CI. A build with that patch seems work. |
I really like this idea! ❤️ Even after adding the For example, I just noticed that our Rails 6 application generation in ActiveAdmin is crashing, but the crash is only buried in the logs, so there's no way to notice other than manual log scanning (or if the failure affects further tests, but in that case, the culprit is still very hidden). |
According to the description of `exit_on_failure?`, the process should exit with status 1 if any error happens. I think that it should be also applied to `run`. Although we can pass `abort_on_failure` option for `run`, passing it every time seems a little redundant when we call `run` multiple times. This is the other reason for this change.
c67dacf
to
5738a3b
Compare
I've rebased onto the top of the master. The build seems OK. |
Any chance on getting a review here? |
👍, this also matches the original intent #628 I don't have commit access, so it'll have to be @rafaelfranca who merges ❤️ |
Abort if the command for `run` fails and `exit_on_failure?` is true
Hi, there 🌈
I'd like to change the error handling of
Thor::Actions#run
for the following reason.According to the description of
exit_on_failure?
, the process should exit with status 1 if any error happens. I think that it should be also applied torun
.Although we can pass
abort_on_failure
option forrun
, passing it every time seems a little redundant when we callrun
multiple times. This is the other reason for this change.For instance, when an error occres here, I want to notice not only by the output but also by the status code.