diff options
author | Tim Smith <tsmith@chef.io> | 2019-01-21 08:49:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-21 08:49:03 -0800 |
commit | 8545b774295fbcfe3140278ee33cd87c62327c34 (patch) | |
tree | ab7d73357907e53556ef1fc666d161e01ade4454 | |
parent | 47f1fb22b979c33ff80eafd3c39d584c7ede2cd9 (diff) | |
parent | 562f50e71b9bc42045d3bc43e05bb40bf25f389a (diff) | |
download | chef-8545b774295fbcfe3140278ee33cd87c62327c34.tar.gz |
Merge pull request #8140 from jeroenj/homebrew-cask-casked-check
Fix cask resource running each chef-client run
-rw-r--r-- | lib/chef/resource/homebrew_cask.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/homebrew_cask.rb b/lib/chef/resource/homebrew_cask.rb index 13f13adb0d..264ad72587 100644 --- a/lib/chef/resource/homebrew_cask.rb +++ b/lib/chef/resource/homebrew_cask.rb @@ -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) |