diff options
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r-- | lib/chef/knife.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb index 4874f28cd6..038ab61715 100644 --- a/lib/chef/knife.rb +++ b/lib/chef/knife.rb @@ -489,11 +489,8 @@ class Chef ui.error "You need to add a #run method to your knife command before you can use it" end enforce_path_sanity - Chef::LocalMode.setup_server_connectivity - begin + Chef::LocalMode.with_server_connectivity do run - ensure - Chef::LocalMode.destroy_server_connectivity end rescue Exception => e raise if raise_exception || Chef::Config[:verbosity] == 2 |