Skip to content

Commit

Permalink
fix selected_version (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kukurijek authored Jul 4, 2021
1 parent 15943db commit dd5b114
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fastlane/plugin/docc/actions/docc_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ def self.run(params)

shell_command = command.join(' ')
UI.message(shell_command.to_s)
selected_version = sh("xcodebuild -version").match(/^Xcode (.*)$/)
pure_version = selected_version.to_s.sub('Xcode ', '')

(UI.user_error!("Make sure Xcode 13 is installed and select it for Command Line Tool - your version: #{selected_version}") unless selected_version.to_i >= 13.0) unless sh("xcodebuild -version").match(/^Xcode (.*)$/).nil?
unless selected_version.nil? == true
UI.user_error!("Make sure Xcode 13 is installed and select it for Command Line Tool - your version: #{selected_version}") unless pure_version.to_i >= 13.0
end

sh(shell_command.to_s)
end
Expand Down

0 comments on commit dd5b114

Please sign in to comment.