class Fastlane::Actions::BrewAction
Public Class Methods
available_options()
click to toggle source
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 27 def self.available_options [ FastlaneCore::ConfigItem.new(key: :command, description: "Brew command to be executed", optional: false, is_string: true) ] end
description()
click to toggle source
@!group Documentation
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 19 def self.description "Run Homebrew/Linuxbrew command" end
details()
click to toggle source
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 23 def self.details 'Example: brew(command:"install imagemagick")' end
example_code()
click to toggle source
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 36 def self.example_code [ 'brew(command:"install imagemagick")' ] end
is_supported?(platform)
click to toggle source
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 46 def self.is_supported?(platform) true end
run(params)
click to toggle source
# File lib/fastlane/plugin/brew/actions/brew_action.rb, line 4 def self.run(params) Actions.sh("which brew", log: false, error_callback: proc do |error_output| UI.user_error!("Homebrew/Linuxbrew is not installed") end) UI.command("brew #{params[:command]}") FastlaneCore::CommandExecutor.execute(command: 'env -i HOME="$HOME" TERM="$TERM" LC_CTYPE="${LC_ALL:-${LC_CTYPE:-$LANG}}" PATH="$PATH" USER="$USER" brew ' + params[:command], print_all: true, print_command: false) end