Sha256: 3d89e50ad88d127132a1576c5e5a4b033eb8c1a5b1cb31811fcf4ab3eeb30a84

Contents?: true

Size: 1.01 KB

Versions: 553

Compression:

Stored size: 1.01 KB

Contents

module Fastlane
  module Actions
    # will make sure a gem is installed. If it's not an appropriate error message is shown
    # this will *not* 'require' the gem
    def self.verify_gem!(gem_name)
      begin
        FastlaneRequire.install_gem_if_needed(gem_name: gem_name, require_gem: false)
        # We don't import this by default, as it's not always the same
        # also e.g. cocoapods is just required and not imported
      rescue Gem::LoadError
        UI.error("Could not find gem '#{gem_name}'")
        UI.error("")
        UI.error("If you installed fastlane using `sudo gem install fastlane` run")
        UI.command("sudo gem install #{gem_name}")
        UI.error("to install the missing gem")
        UI.error("")
        UI.error("If you use a Gemfile add this to your Gemfile:")
        UI.important("  gem '#{gem_name}'")
        UI.error("and run `bundle install`")

        UI.user_error!("You have to install the `#{gem_name}` gem on this machine") unless Helper.test?
      end
      true
    end
  end
end

Version data entries

553 entries across 553 versions & 2 rubygems

Version Path
fastlane-2.174.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.173.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.172.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.171.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.170.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.169.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.168.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.167.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.166.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.165.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.164.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.163.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.162.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.161.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.160.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.159.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.158.0 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.157.4 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.157.3 fastlane/lib/fastlane/helper/gem_helper.rb
fastlane-2.157.2 fastlane/lib/fastlane/helper/gem_helper.rb