diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-03-09 19:52:26 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-04-16 15:23:28 -0700 |
commit | 20de02f564a5fea6b739796d9ffbcf119383401c (patch) | |
tree | 44dab35412deb07fd5696cef1a64c40eaec4425f /lib | |
parent | e3c517dedf84a5d47fcda813697f3c2ad5b631ee (diff) | |
download | chef-20de02f564a5fea6b739796d9ffbcf119383401c.tar.gz |
Make sure we concat an package_name as an array
This prevents the non-array form from breaking things
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/package/homebrew.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/homebrew.rb b/lib/chef/provider/package/homebrew.rb index 93c2d87e40..360ebcc864 100644 --- a/lib/chef/provider/package/homebrew.rb +++ b/lib/chef/provider/package/homebrew.rb @@ -95,7 +95,7 @@ class Chef # @returns [Hash] a hash of package information where the key is the package name def brew_info @brew_info ||= begin - command_array = ["info", "--json=v1"].concat new_resource.package_name + command_array = ["info", "--json=v1"].concat Array(new_resource.package_name) # convert the array of hashes into a hash where the key is the package name Hash[Chef::JSONCompat.from_json(brew(command_array)).collect { |pkg| [pkg["name"], pkg] }] end |