-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Fix LoadError catching when it's not related to CommandsGenerator #8831
Conversation
We rescue `LoadError` so that we tell users to run the tool directly if CommandsGenerator is not available. However since we call `.start` inside that `begin` `rescue` block we'd catch all LoadErrors from within fastlane, and then show the confusing error message of ``` pilot can't be called via `fastlane pilot`, run 'pilot' directly instead ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny name nit, but 👍
@@ -48,13 +48,14 @@ def take_off | |||
require File.join(tool_name, "commands_generator") | |||
|
|||
# Call the tool's CommandsGenerator class and let it do its thing | |||
Object.const_get(tool_name.fastlane_module)::CommandsGenerator.start | |||
commands_generator_ref = Object.const_get(tool_name.fastlane_module)::CommandsGenerator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: adding "_ref" seems redundant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Hey @KrauseFx 👋 Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉 Please let us know if this change requires an immediate release by adding a comment here 👍 |
Congratulations! 🎉 This was released as part of fastlane 2.27.0 🚀 |
We rescue
LoadError
so that we tell users to run the tool directly if CommandsGenerator is not available. However since we call.start
inside thatbegin
rescue
block we'd catch all LoadErrors from within fastlane, and then show the confusing error message of