Unguard xcode version check in FastlaneCore::ItunesTransporter #11184
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.
Quite some time ago in #4631 ("Only query for xcode version on macs") a
Helper.is_mac? &&
was added as "guard" beforeHelper.xcode_version.start_with?('6.')
, so only if run on mac, the xcode version is actually checked:fastlane/fastlane_core/lib/fastlane_core/itunes_transporter.rb
Line 307 in c99910b
Unfortunately I could not find out why this was done. I assume it was done to make this code not crash on system that do not have Xcode installed - which may have raised an exception if you went to check for the version.
Unfortunately it has the side effect of also making tests, that mock this xcode version check to the required 6.x version so the
ShellScriptTransporterExecutor
is used, not pass on non-Mac platforms.Fortunately
Helper.xcode_version
got its own guard a few months ago in PR #9998:fastlane/fastlane_core/lib/fastlane_core/helper.rb
Line 143 in 5019acb
With this new check, the additional check in
ItunesTransporter
is not necessary any more (as the version will be returned asnil
on non-Mac platforms instead of raising an exception) and can be removed - which this PR does.