diff options
author | Scott Hain <shain@chef.io> | 2015-05-22 14:52:49 -0700 |
---|---|---|
committer | Scott Hain <shain@chef.io> | 2015-05-22 14:52:49 -0700 |
commit | d61df201256aa03d7c19944ebef020d40ee1fa29 (patch) | |
tree | 54d4fe1b3ecd72d536507a94658ce629b9b1a224 /lib/chef | |
parent | 92cb65508c198d04fb12e1e99475c80bd8a16c4a (diff) | |
download | chef-d61df201256aa03d7c19944ebef020d40ee1fa29.tar.gz |
Fix cli issue with unset chef_repo_pathshain/fix_cli
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/application/client.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index a5faee9d35..551e26e303 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -279,6 +279,12 @@ class Chef::Application::Client < Chef::Application Chef::Config[:chef_server_url] = config[:chef_server_url] if config.has_key? :chef_server_url Chef::Config.local_mode = config[:local_mode] if config.has_key?(:local_mode) + + if Chef::Config.has_key?(:chef_repo_path) && Chef::Config.chef_repo_path.nil? + Chef::Config.delete(:chef_repo_path) + Chef::Log.warn "chef_repo_path was set in a config file but was empty. Assuming #{Chef::Config.chef_repo_path}" + end + 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 |