diff options
author | John Keiser <jkeiser@opscode.com> | 2013-10-14 19:27:43 -0700 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-10-14 19:27:43 -0700 |
commit | 2da5abd0648f3ba6977d3a69d858078237bee585 (patch) | |
tree | de09ef7de02ee3f487afa4362a238784ca9d07b3 /lib/chef/config.rb | |
parent | 294f9770d993b3ad6d504470a5ab1a9cbac59231 (diff) | |
download | chef-2da5abd0648f3ba6977d3a69d858078237bee585.tar.gz |
Set cache_path under the user's home dir rather than the local repo path
Diffstat (limited to 'lib/chef/config.rb')
-rw-r--r-- | lib/chef/config.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chef/config.rb b/lib/chef/config.rb index 0158923da9..0a4ee6e94c 100644 --- a/lib/chef/config.rb +++ b/lib/chef/config.rb @@ -215,7 +215,13 @@ class Chef # An array of paths to search for knife exec scripts if they aren't in the current directory default :script_path, [] - default(:cache_path) { local_mode ? "#{chef_repo_path}#{platform_path_separator}.cache" : platform_specific_path("/var/chef") } + default(:cache_path) do + if local_mode + "#{user_home}#{platform_path_separator}.chef#{platform_path_separator}local-mode-cache" + else + platform_specific_path("/var/chef") + end + end # Where cookbook files are stored on the server (by content checksum) default(:checksum_path) { "#{cache_path}#{platform_path_separator}checksums" } |