From dbd0bae6057d294496e5bb363f56687b3f687563 Mon Sep 17 00:00:00 2001 From: sersut Date: Fri, 15 Feb 2013 16:43:58 -0800 Subject: CHEF-3690: Restore run_chef_client private method relied upon by WindowsService class --- lib/chef/application/windows_service.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/chef/application') diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index db3c17a669..4e32867f2f 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -158,6 +158,19 @@ class Chef private + # Initializes Chef::Client instance and runs it + def run_chef_client + @chef_client = Chef::Client.new( + @chef_client_json, + :override_runlist => config[:override_runlist] + ) + @chef_client_json = nil + + @chef_client.run + @chef_client = nil + end + + def apply_config(config_file_path) Chef::Config.from_file(config_file_path) Chef::Config.merge!(config) -- cgit v1.2.1