summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-02-15 16:43:58 -0800
committersersut <serdar@opscode.com>2013-02-15 16:43:58 -0800
commitdbd0bae6057d294496e5bb363f56687b3f687563 (patch)
tree89b316b9dcd25dac773cf3aae2827eb4d58ce961
parent69ea2173fcf7c308c0617047144c966d257663f5 (diff)
downloadchef-dbd0bae6057d294496e5bb363f56687b3f687563.tar.gz
CHEF-3690: Restore run_chef_client private method relied upon by WindowsService class
-rw-r--r--lib/chef/application/windows_service.rb13
1 files changed, 13 insertions, 0 deletions
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)