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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[action][ensure_env_vars] efficiency improvement #18522
[action][ensure_env_vars] efficiency improvement #18522
Conversation
is_one = missing_variables.length == 1 | ||
UI.user_error!("Missing environment variable#{is_one ? '' : 's'} '#{missing_variables.join('\', \'')}'") unless missing_variables.empty? |
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.
is_one = missing_variables.length == 1 | |
UI.user_error!("Missing environment variable#{is_one ? '' : 's'} '#{missing_variables.join('\', \'')}'") unless missing_variables.empty? | |
UI.user_error!("Missing environment variable(s) '#{missing_variables.join('\', \'')}'") unless missing_variables.empty? |
I understand that this logic comes from the below line but isn't this enough here? 馃檪 (and reusing the same local variable for a different purpose doesn't sound good in general).
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.
馃殌
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.
This is 馃敟 Thanks for fixing this! Really appreciate all of your contributions 鉂わ笍
Hey @crazymanish 馃憢 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.181.0 馃殌 |
Checklist
bundle exec rspec
from the root directory to see all new and existing tests passbundle exec rubocop -a
to ensure the code style is validMotivation and Context
ensure_env_vars
multiple times because it always EXIT after found the first missing ENV variable.ensure_env_vars
multiple times 馃槆Description
ensure_env_vars
more efficient, now it will report all missing ENV variables after one run itself.Testing Steps
bundle install
withbundle exec fastlane test
Screenshot