Sha256: 801647dfdad65b481f611995cf7b5fd18c133e869e978ca39fe4a7fec3d16b52

Contents?: true

Size: 1.47 KB

Versions: 142

Compression:

Stored size: 1.47 KB

Contents

module Fastlane
  module Actions
    module SharedValues
    end

    # Raises an exception and stop the lane execution if not using bundle exec to run fastlane
    class EnsureBundleExecAction < Action
      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

      #####################################################
      # @!group Documentation
      #####################################################

      def self.description
        "Raises an exception if not using `bundle exec` to run fastlane"
      end

      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

      def self.available_options
        []
      end

      def self.output
        []
      end

      def self.author
        ['rishabhtayal']
      end

      def self.example_code
        [
          "ensure_bundle_exec"
        ]
      end

      def self.category
        :misc
      end

      def self.is_supported?(platform)
        true
      end
    end
  end
end

Version data entries

142 entries across 142 versions & 4 rubygems

Version Path
fastlane-2.225.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.224.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.223.1 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.223.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.222.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.221.1 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.221.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.220.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.219.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.218.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-security-patched-2.216.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.217.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.216.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.215.1 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.215.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-mercafacil-2.214.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.214.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.213.0 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane-2.212.2 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb
fastlane_pricing_fix-2.212.1 fastlane/lib/fastlane/actions/ensure_bundle_exec.rb