class Chef::Resource::BuildEssential

Public Instance Methods

after_created() click to toggle source

this resource forces itself to run at compile_time

# File lib/chef/resource/build_essential.rb, line 131
def after_created
  return unless compile_time
  Array(action).each do |action|
    run_action(action)
  end
end
xcode_cli_installed?() click to toggle source

Determine if the XCode Command Line Tools are installed

@return [true, false]

# File lib/chef/resource/build_essential.rb, line 122
def xcode_cli_installed?
  cmd = Mixlib::ShellOut.new("pkgutil --pkgs=com.apple.pkg.CLTools_Executables")
  cmd.run_command
  # pkgutil returns an error if the package isn't found aka not installed
  cmd.error? ? false : true
end