summaryrefslogtreecommitdiff
path: root/lib/chef/resource/homebrew_tap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/homebrew_tap.rb')
-rw-r--r--lib/chef/resource/homebrew_tap.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/resource/homebrew_tap.rb b/lib/chef/resource/homebrew_tap.rb
index 9d880c565f..bbcc0b1463 100644
--- a/lib/chef/resource/homebrew_tap.rb
+++ b/lib/chef/resource/homebrew_tap.rb
@@ -78,6 +78,9 @@ class Chef
end
end
+ # Is the passed tap already tapped
+ #
+ # @return [Boolean]
def tapped?(name)
tap_dir = name.gsub("/", "/homebrew-")
::File.directory?("/usr/local/Homebrew/Library/Taps/#{tap_dir}")