diff options
author | John Keiser <jkeiser@opscode.com> | 2014-06-05 14:19:12 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2014-06-05 14:57:30 -0700 |
commit | 56a83067f8592b63960fa95af0f49b80cd4c5c9a (patch) | |
tree | 8cbaf819cae8ab038218a8bf8574b0da4c939817 /lib/chef/config.rb | |
parent | e7273d0b27c25ac218c968c1abf0bf5d332420c9 (diff) | |
download | chef-56a83067f8592b63960fa95af0f49b80cd4c5c9a.tar.gz |
Use path_join to create local-mode-cachejk/config_dir
Always give config_dir a value
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r-- | lib/chef/config.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index dd1b44661b..c87cfcaaa7 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -101,10 +101,10 @@ class Chef configurable(:config_file) default(:config_dir) do - if local_mode - path_join(user_home, ".chef#{platform_path_separator}") + if config_file + ::File.dirname(config_file) else - config_file && ::File.dirname(config_file) + path_join(user_home, ".chef#{platform_path_separator}") end end @@ -238,7 +238,7 @@ class Chef # this is under the user's home directory. default(:cache_path) do if local_mode - "#{config_dir}local-mode-cache" + path_join(config_dir, 'local-mode-cache') else primary_cache_root = platform_specific_path("/var") primary_cache_path = platform_specific_path("/var/chef") @@ -384,7 +384,7 @@ class Chef # certificates in this directory will be added to whatever CA bundle ruby # is using. Use this to add self-signed certs for your Chef Server or local # HTTP file servers. - default(:trusted_certs_dir) { config_dir && path_join(config_dir, "trusted_certs") } + default(:trusted_certs_dir) { path_join(config_dir, "trusted_certs") } # Where should chef-solo download recipes from? default :recipe_url, nil |