summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-01-21 10:09:23 -0800
committerGitHub <noreply@github.com>2019-01-21 10:09:23 -0800
commit19cc66255b63d387db408278b895ed5eeebd1d14 (patch)
treeaef3a38511d902ad8bc3a927bdb23b423aca33ea
parentf6b4553c8dfd5ddd998f106be3786b95a9fe1ec9 (diff)
parentea124b4434be0ffe14eef981db0b1d75433b25bc (diff)
downloadchef-19cc66255b63d387db408278b895ed5eeebd1d14.tar.gz
Merge pull request #8143 from chef/chef_14_homebrew
homebrew_cask: Ensure the resource is fully idempotent
-rw-r--r--lib/chef/resource/homebrew_cask.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb
index 5162228e36..9e68d8a3c5 100644
--- a/lib/chef/resource/homebrew_cask.rb
+++ b/lib/chef/resource/homebrew_cask.rb
@@ -55,7 +55,7 @@ class Chef
action :install do
description "Install an application packaged as a Homebrew cask."
- homebrew_tap "caskroom/cask" if new_resource.install_cask
+ homebrew_tap "homebrew/cask" if new_resource.install_cask
unless casked?
converge_by("install cask #{new_resource.cask_name} #{new_resource.options}") do
@@ -70,7 +70,7 @@ class Chef
action :remove do
description "Remove an application packaged as a Homebrew cask."
- homebrew_tap "caskroom/cask" if new_resource.install_cask
+ homebrew_tap "homebrew/cask" if new_resource.install_cask
if casked?
converge_by("uninstall cask #{new_resource.cask_name}") do
@@ -89,7 +89,7 @@ class Chef
def casked?
unscoped_name = new_resource.cask_name.split("/").last
- shell_out!('#{new_resource.homebrew_path} cask list 2>/dev/null',
+ shell_out!("#{new_resource.homebrew_path} cask list 2>/dev/null",
user: new_resource.owner,
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
cwd: ::Dir.home(new_resource.owner)).stdout.split.include?(unscoped_name)