summaryrefslogtreecommitdiff
path: root/lib/chef/resource/homebrew_cask.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/homebrew_cask.rb')
-rw-r--r--lib/chef/resource/homebrew_cask.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb
index 264ad72587..1f5a9afa81 100644
--- a/lib/chef/resource/homebrew_cask.rb
+++ b/lib/chef/resource/homebrew_cask.rb
@@ -87,6 +87,9 @@ class Chef
alias_method :action_uncask, :action_remove
alias_method :action_uninstall, :action_remove
+ # Is the desired cask already casked?
+ #
+ # @return [Boolean]
def casked?
unscoped_name = new_resource.cask_name.split("/").last
shell_out!("#{new_resource.homebrew_path} cask list 2>/dev/null",