diff options
author | John Keiser <jkeiser@opscode.com> | 2014-07-03 20:20:03 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-07-07 10:04:59 -0700 |
commit | 4f6488026bed45da624812de6985b1168b2358b2 (patch) | |
tree | 86cfb1945fce1fc061c64a37d8ab0da2495fab44 /lib/chef/application.rb | |
parent | b658f99957b24bfdf72fb340336d0348fdaf70f5 (diff) | |
download | chef-4f6488026bed45da624812de6985b1168b2358b2.tar.gz |
Refactor caller decorations into with_server_connectivity
Diffstat (limited to 'lib/chef/application.rb')
-rw-r--r-- | lib/chef/application.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index b1d28f618c..5b404a3a50 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -187,9 +187,7 @@ class Chef::Application # Initializes Chef::Client instance and runs it def run_chef_client(specific_recipes = []) - Chef::LocalMode.setup_server_connectivity - - begin + Chef::LocalMode.with_server_connectivity do override_runlist = config[:override_runlist] if specific_recipes.size > 0 override_runlist ||= [] @@ -204,8 +202,6 @@ class Chef::Application @chef_client.run @chef_client = nil - ensure - Chef::LocalMode.destroy_server_connectivity end end |