diff options
author | Thom May <thom@may.lt> | 2017-04-11 13:22:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 13:22:06 +0100 |
commit | ab621a6151c309f7b9787c8c7134453ae6e04e36 (patch) | |
tree | afeb0316626c85c5457f0e59c06107ed7170b30d /lib | |
parent | 9f525597f4e40a3dfec7bf469cbe2677de58200b (diff) | |
parent | d9a7c0863a67c066523584f11b7a1aeda60a2e05 (diff) | |
download | chef-ab621a6151c309f7b9787c8c7134453ae6e04e36.tar.gz |
Merge pull request #6047 from coderanger/yum-options
Fix some fallout from the options converstion to an array
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/package.rb | 6 | ||||
-rw-r--r-- | lib/chef/provider/package/yum.rb | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/chef/provider/package.rb b/lib/chef/provider/package.rb index 65dda05f85..4b73f47ed3 100644 --- a/lib/chef/provider/package.rb +++ b/lib/chef/provider/package.rb @@ -297,7 +297,11 @@ class Chef def expand_options(options) # its deprecated but still work to do to deprecate it fully #Chef.deprecated(:package_misc, "expand_options is deprecated, use shell_out_compact or shell_out_compact_timeout instead") - options ? " #{options}" : "" + if options + " #{options.is_a?(Array) ? Shellwords.join(options) : options}" + else + "" + end end # Check the current_version against either the candidate_version or the new_version diff --git a/lib/chef/provider/package/yum.rb b/lib/chef/provider/package/yum.rb index f1ba9dd4eb..d87e421409 100644 --- a/lib/chef/provider/package/yum.rb +++ b/lib/chef/provider/package/yum.rb @@ -194,7 +194,7 @@ class Chef def manage_extra_repo_control if new_resource.options repo_control = [] - new_resource.options.split.each do |opt| + new_resource.options.each do |opt| repo_control << opt if opt =~ /--(enable|disable)repo=.+/ end |