-
Notifications
You must be signed in to change notification settings - Fork 43
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
rescue from command Exception #38
Comments
It seems like the goto solution has been to append Personally I agree though -- this solution isn't good enough if you need to fork your runbook behaviour depending on certain steps.
This is the code I use for that:
I don't think we can do better than a |
Thanks for the suggestion. I'll leave this open to see if there is other feedback but the workaround makes sense. |
Hello, I'm having a hard time trying to rescue a failed
command
execution in a meaningful way.Excerpt from my code:
The goal of this snippet is to check if a GCP Cloud Storage Bucket Object for a Helm Chart is present, given an application name and a version (taken from user input).
Unfortunately though, I'm not able to
rescue
the exception in any meaningful way. I tried usingraise_on_non_zero_exit
but the effect is not what I'd want to achieve.I'd like to be able to nicely handle known exceptions from this command, by inspecting the exception message and taking appropriate action. As I'm within a
ruby_command
I was expecting this to work (it should in any case probably?).Is this even possible? If yes, how could I achieve the expected result? If not, any viable workaround?
Thanks!
The text was updated successfully, but these errors were encountered: