summaryrefslogtreecommitdiff
path: root/lib/chef/config.rb
diff options
context:
space:
mode:
authortylercloke <tylercloke@gmail.com>2015-04-23 13:35:58 -0700
committertylercloke <tylercloke@gmail.com>2015-04-28 14:24:57 -0700
commit2c07a07d816937c5228b67836782a19fb7e7a30b (patch)
tree7c5febef7c1b63a3cd720e3562aa3000e84a8f4e /lib/chef/config.rb
parentafa4b9e4034628bf5a4f337cf57cfa657df6ec3d (diff)
downloadchef-2c07a07d816937c5228b67836782a19fb7e7a30b.tar.gz
Implemented `knife user key create` and `knife client key create`.
Implemented using a common service class that contains most of the actual functionality outside of parsing and inheriting Chef::Knife.
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r--lib/chef/config.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb
index d73bcf8e6e..d2d3c736c2 100644
--- a/lib/chef/config.rb
+++ b/lib/chef/config.rb
@@ -326,8 +326,10 @@ class Chef
# 'some_url.../organizations/*' then remove the '/organization/*' by default
if self.configuration[:chef_server_url] =~ /\/organizations\/\S*$/
self.configuration[:chef_server_url].split('/')[0..-3].join('/')
- else # default to whatever chef_server_url is
+ elsif self.configuration[:chef_server_url] # default to whatever chef_server_url is
self.configuration[:chef_server_url]
+ else
+ "https://localhost:443"
end
end