diff options
author | John Keiser <jkeiser@opscode.com> | 2013-10-09 16:59:38 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-10-09 16:59:38 -0700 |
commit | 2a214bcff7174b61129a7a8a642b8df5b5f4afee (patch) | |
tree | 5b04e9e034fa209a54575b4df24f1fac0661fe78 /lib/chef/application.rb | |
parent | f9521c3aaa6aaa42f94bbf81b260797da199f6a9 (diff) | |
download | chef-2a214bcff7174b61129a7a8a642b8df5b5f4afee.tar.gz |
Pick up knife config instead of /etc/chef/client.rb if local mode is specified
Diffstat (limited to 'lib/chef/application.rb')
-rw-r--r-- | lib/chef/application.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 167ea5dfec..ca9cfff291 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -66,9 +66,18 @@ class Chef::Application run_application end - # Parse the configuration file + # Parse configuration (options and config file) def configure_chef parse_options + load_config_file + end + + # Parse the config file + def load_config_file + if !config[:config_file] + Chef::Log.warn("No config file found or specified on command line, not loading.") + return + end begin case config[:config_file] @@ -90,7 +99,6 @@ class Chef::Application rescue Exception => error Chef::Application.fatal!("Unknown error processing config file #{config[:config_file]} with error #{error.message}", 2) end - end # Initialize and configure the logger. |