diff options
author | Lamont Granquist <454857+lamont-granquist@users.noreply.github.com> | 2022-01-18 12:36:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 12:36:46 -0800 |
commit | 36be2d7d6f92f1168c4a5ada90ebd2b50848805e (patch) | |
tree | cc50c8733d04270013af3dd5bcb7e1d261fffced | |
parent | d0b08c09e1664108d1e59ac5e92ab264a295d111 (diff) | |
download | chef-36be2d7d6f92f1168c4a5ada90ebd2b50848805e.tar.gz |
Update chef-config/lib/chef-config/config.rbavoid_config_calls
Co-authored-by: pete higgins <pete@peterhiggins.org>
-rw-r--r-- | chef-config/lib/chef-config/config.rb | 3 |
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 |