Sha256: 1c49786386b80cd15a36c73c3187b6fc7d9844e8dd0ff49e6c39f54c056b27f5
Contents?: true
Size: 1.61 KB
Versions: 7
Compression:
Stored size: 1.61 KB
Contents
module Pantograph module Actions # Raises an exception and stop the lane execution if not using bundle exec to run pantograph class EnsureBundleExecAction < Action def self.run(params) return if PluginManager.new.gemfile_path.nil? if PantographCore::Helper.bundler? UI.success('Using bundled pantograph ✅') else error_message = [ 'pantograph detected a Gemfile in the current directory.', 'However it seems like you did not use `bundle exec`.', "Use `bundle exec pantograph #{ARGV.join(' ')}`" ] error_message = error_message.join(' ') UI.user_error!(error_message) end end ##################################################### # @!group Documentation ##################################################### def self.description 'Raises an exception if not using `bundle exec` to run pantograph' end def self.details [ 'This action will check if you are using bundle exec to run pantograph.' ].join("\n") end def self.available_options [] end def self.output [] end def self.author ['rishabhtayal', 'johnknapprs'] end def self.example_code [ 'ensure_bundle_exec', ' # always check before running a lane before_all do ensure_bundle_exec end ' ] end def self.category :misc end def self.is_supported?(platform) true end end end end
Version data entries
7 entries across 7 versions & 1 rubygems