summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2015-04-13 11:22:20 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2015-04-15 17:50:15 -0700
commit71ac980f7a76e70d18b63751cd70d24c40921152 (patch)
tree03bdd57085a353a5fd46c8505d2eb3dc80b4f1e7 /lib/chef/client.rb
parente3a6565927e854cd5968bd3a6bd2248ec1245549 (diff)
downloadchef-71ac980f7a76e70d18b63751cd70d24c40921152.tar.gz
move where we dep inject the priority maps
fixes the priority maps on chef-apply by wiring it up in the constructor of the client
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index 098345a9e2..d04a3dbbd5 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -166,6 +166,13 @@ class Chef
if new_runlist = args.delete(:runlist)
@json_attribs["run_list"] = new_runlist
end
+
+ # these slurp in the resource+provider world, so be exceedingly lazy about requiring them
+ require 'chef/platform/provider_priority_map' unless defined? Chef::Platform::ProviderPriorityMap
+ require 'chef/platform/resource_priority_map' unless defined? Chef::Platform::ResourcePriorityMap
+
+ Chef.set_provider_priority_map(Chef::Platform::ProviderPriorityMap.instance)
+ Chef.set_resource_priority_map(Chef::Platform::ResourcePriorityMap.instance)
end
def configure_formatters