Abort if the command for run fails and exit_on_failure? is true#651
Abort if the command for run fails and exit_on_failure? is true#651rafaelfranca merged 1 commit intorails:masterfrom
run fails and exit_on_failure? is true#651Conversation
|
#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#runfor 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_failureoption forrun, passing it every time seems a little redundant when we callrunmultiple 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.