class Chef::Resource::HomebrewTap
Public Instance Methods
Source
# File lib/chef/resource/homebrew_tap.rb, line 83 def tapped?(name) brew_path = ::File.dirname(homebrew_bin_path(new_resource.homebrew_path)) base_path = [ "#{brew_path}/../homebrew", "#{brew_path}/../Homebrew", "/opt/homebrew", "/usr/local/Homebrew", "/home/linuxbrew/.linuxbrew", ].filter_map { |x| x if Dir.exist?(x) }.first tap_dir = name.gsub("/", "/homebrew-") ::File.directory?("#{base_path}/Library/Taps/#{tap_dir}") end
Is the passed tap already tapped
@return [Boolean]