summaryrefslogtreecommitdiff
path: root/lib/chef/knife.rb
diff options
context:
space:
mode:
authordanielsdeleo <dan@getchef.com>2015-03-31 14:33:19 -0700
committerdanielsdeleo <dan@getchef.com>2015-04-01 13:35:01 -0700
commit8157fdea21c913dfb99ee4f8c285d2d64557d4bc (patch)
tree3d4d3998276f92411cc61cac8135befd3de714e2 /lib/chef/knife.rb
parentf066fef19be99ba1b857ecaaabc4c70c9201f1d4 (diff)
downloadchef-8157fdea21c913dfb99ee4f8c285d2d64557d4bc.tar.gz
Add --no-listen option to disable zero binding to port
Diffstat (limited to 'lib/chef/knife.rb')
-rw-r--r--lib/chef/knife.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/knife.rb b/lib/chef/knife.rb
index e13f80b5a8..2e0694aebc 100644
--- a/lib/chef/knife.rb
+++ b/lib/chef/knife.rb
@@ -373,6 +373,9 @@ class Chef
Chef::Config[:environment] = config[:environment] if config[:environment]
Chef::Config.local_mode = config[:local_mode] if config.has_key?(:local_mode)
+
+ Chef::Config.listen = config[:listen] if config.has_key?(:listen)
+
if Chef::Config.local_mode && !Chef::Config.has_key?(:cookbook_path) && !Chef::Config.has_key?(:chef_repo_path)
Chef::Config.chef_repo_path = Chef::Config.find_chef_repo_path(Dir.pwd)
end