summaryrefslogtreecommitdiff
path: root/chef-config/lib/chef-config/config.rb
diff options
context:
space:
mode:
Diffstat (limited to 'chef-config/lib/chef-config/config.rb')
-rw-r--r--chef-config/lib/chef-config/config.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index c5e849a586..4f5573f660 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -84,7 +84,8 @@ module ChefConfig
# @return [String] the platform-specific path
#
def self.etc_chef_dir(windows: ChefUtils.windows?)
- @etc_chef_dir ||= begin
+ @etc_chef_dir ||= {}
+ @etc_chef_dir[windows] ||= begin
path = windows ? c_chef_dir : PathHelper.join("/etc", ChefUtils::Dist::Infra::DIR_SUFFIX, windows: windows)
PathHelper.cleanpath(path, windows: windows)
end