Skip to content
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

[fastlane][action] fix git_branch when not in a git repo #18525

Merged
merged 1 commit into from Apr 12, 2021

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Apr 9, 2021

Motivation and Context

I noticed when running fastlane in a folder that was not a git repo, that things would fail. There are some actions that use Actions.git_branch a dynamic default value that would error out. This will add safety for when there is no git repo.

Resolves #18467

Description

This solution wraps the shell command that Actions.git_branch executes in a begin/rescue and returns nil if an error is caught.

Copy link
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@joshdholtz joshdholtz merged commit 24e54d7 into master Apr 12, 2021
@joshdholtz joshdholtz deleted the joshdholtz-fix-git_branch-when-no-git-repo branch April 12, 2021 16:35
@fastlane-bot
Copy link

Hey @joshdholtz 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

Copy link
Member

@rogerluan rogerluan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

@Kukurijek
Copy link
Contributor

Fixes #18467

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.181.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slack action resulting in "Shell command exited with exit status 128 instead of 0"
5 participants