summaryrefslogtreecommitdiff
path: root/lib/chef/local_mode.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/local_mode.rb')
-rw-r--r--lib/chef/local_mode.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/chef/local_mode.rb b/lib/chef/local_mode.rb
index c6c5685e3f..79fb750dd8 100644
--- a/lib/chef/local_mode.rb
+++ b/lib/chef/local_mode.rb
@@ -65,7 +65,11 @@ class Chef
server_options[:port] = parse_port(Chef::Config.chef_zero.port)
@chef_zero_server = ChefZero::Server.new(server_options)
- @chef_zero_server.start_background
+ if Chef::Config[:listen]
+ @chef_zero_server.start_background
+ else
+ @chef_zero_server.start_socketless
+ end
local_mode_url = @chef_zero_server.local_mode_url