Lazy load xcode-select and xcodebuild #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We recently add
simctl
to fastlane (thank you for this awesome gem 😊) in this PR - fastlane/fastlane#12039. However, we had to do some weird things to make our rubocop setup happy when including this gem on different operating systems. The initial execution of findingxcode-select
andxcodebuild
on gem/file load causes weird things when running on a non-macOS.My proposed change lazy loads the finding of
xcode-select
andxcodebuild
to prevent issues of when this gem is included in things that aren't always running on macOS. 💪Let me know if there is anything else you would like added to this PR or if you have any questions regarding my thoughts/issues ❤️