Method: Fastlane::FastFile#is_platform_block?

Defined in:
fastlane/lib/fastlane/fast_file.rb

#is_platform_block?(key) ⇒ Boolean

Is the given key a platform block or a lane?

Returns:



167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'fastlane/lib/fastlane/fast_file.rb', line 167

def is_platform_block?(key)
  UI.crash!('No key given') unless key

  return false if self.runner.lanes.fetch(nil, {}).fetch(key.to_sym, nil)
  return true if self.runner.lanes[key.to_sym].kind_of?(Hash)

  if key.to_sym == :update
    # The user ran `fastlane update`, instead of `fastlane update_fastlane`
    # We're gonna be nice and understand what the user is trying to do
    require 'fastlane/one_off'
    Fastlane::OneOff.run(action: "update_fastlane", parameters: {})
  else
    UI.user_error!("Could not find '#{key}'. Available lanes: #{self.runner.available_lanes.join(', ')}")
  end
end