class Fastlane::Actions::EnsureBundleExecAction

Raises an exception and stop the lane execution if not using bundle exec to run fastlane

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 40
def self.author
  ['rishabhtayal']
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 32
def self.available_options
  []
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 50
def self.category
  :misc
end
description() click to toggle source

@!group Documentation

# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 21
def self.description
  "Raises an exception if not using `bundle exec` to run fastlane"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 25
def self.details
  [
    "This action will check if you are using `bundle exec` to run fastlane.",
    "You can put it into `before_all` to make sure that fastlane is ran using the `bundle exec fastlane` command."
  ].join("\n")
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 44
def self.example_code
  [
    "ensure_bundle_exec"
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 54
def self.is_supported?(platform)
  true
end
output() click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 36
def self.output
  []
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/ensure_bundle_exec.rb, line 8
def self.run(params)
  return if PluginManager.new.gemfile_path.nil?
  if FastlaneCore::Helper.bundler?
    UI.success("Using bundled fastlane ✅")
  else
    UI.user_error!("fastlane detected a Gemfile in the current directory. However, it seems like you didn't use `bundle exec`. Use `bundle exec fastlane #{ARGV.join(' ')}` instead.")
  end
end