summaryrefslogtreecommitdiff
path: root/lib/chef/resource/homebrew_tap.rb
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-01-16 10:52:41 -0800
committerTim Smith <tsmith@chef.io>2019-01-16 10:52:41 -0800
commit69106a0e8e508f7b6d491a38679b87765fc40e98 (patch)
treeeeca57d7a2485c795515b72254f252279ffda4dc /lib/chef/resource/homebrew_tap.rb
parentc86f10dfb9c898874a58cff92804ef437e3e8e98 (diff)
downloadchef-69106a0e8e508f7b6d491a38679b87765fc40e98.tar.gz
homebrew_cask / homebrew_tap: Properly use the cask_name and tap_name propertiescask
If the name properties for these resources we used we'd entirely ignore them. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/homebrew_tap.rb')
-rw-r--r--lib/chef/resource/homebrew_tap.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/resource/homebrew_tap.rb b/lib/chef/resource/homebrew_tap.rb
index aff65685b7..9d880c565f 100644
--- a/lib/chef/resource/homebrew_tap.rb
+++ b/lib/chef/resource/homebrew_tap.rb
@@ -55,9 +55,9 @@ class Chef
action :tap do
description "Add a Homebrew tap."
- unless tapped?(new_resource.name)
- converge_by("tap #{new_resource.name}") do
- shell_out!("#{new_resource.homebrew_path} tap #{new_resource.full ? '--full' : ''} #{new_resource.name} #{new_resource.url || ''}",
+ unless tapped?(new_resource.tap_name)
+ converge_by("tap #{new_resource.tap_name}") do
+ shell_out!("#{new_resource.homebrew_path} tap #{new_resource.full ? '--full' : ''} #{new_resource.tap_name} #{new_resource.url || ''}",
user: new_resource.owner,
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
cwd: ::Dir.home(new_resource.owner))
@@ -68,9 +68,9 @@ class Chef
action :untap do
description "Remove a Homebrew tap."
- if tapped?(new_resource.name)
- converge_by("untap #{new_resource.name}") do
- shell_out!("#{new_resource.homebrew_path} untap #{new_resource.name}",
+ if tapped?(new_resource.tap_name)
+ converge_by("untap #{new_resource.tap_name}") do
+ shell_out!("#{new_resource.homebrew_path} untap #{new_resource.tap_name}",
user: new_resource.owner,
env: { "HOME" => ::Dir.home(new_resource.owner), "USER" => new_resource.owner },
cwd: ::Dir.home(new_resource.owner))