diff options
author | Corey Hemminger <hemminger@hotmail.com> | 2021-12-27 17:47:41 -0600 |
---|---|---|
committer | Corey Hemminger <hemminger@hotmail.com> | 2021-12-27 17:47:41 -0600 |
commit | 58ee2ef63d83f841946ef5a2743e2dc6efcadb3c (patch) | |
tree | 02d3cfd4ca98e9c9f92bf1e80300e20441218b98 /lib | |
parent | dbd9e02a67ed5d8cfa4534c6025015d87ca34ccc (diff) | |
download | chef-58ee2ef63d83f841946ef5a2743e2dc6efcadb3c.tar.gz |
test
Signed-off-by: Corey Hemminger <hemminger@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/chef_client_config.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/chef_client_config.rb b/lib/chef/resource/chef_client_config.rb index 6709e7b7a6..7677de33d6 100644 --- a/lib/chef/resource/chef_client_config.rb +++ b/lib/chef/resource/chef_client_config.rb @@ -252,12 +252,12 @@ class Chef action :create, description: "Create a client.rb config file for configuring #{ChefUtils::Dist::Infra::PRODUCT}." do [ new_resource.config_directory, - ::File.dirname(new_resource.log_location), + (::File.dirname(new_resource.log_location) unless new_resource.log_location.nil?), new_resource.file_backup_path, new_resource.file_cache_path, ::File.join(new_resource.config_directory, "client.d"), - ::File.dirname(new_resource.pid_file), - ]&.each do |dir_path| + (::File.dirname(new_resource.pid_file) unless new_resource.pid_file.nil?), + ].each do |dir_path| next if dir_path.nil? next if ::Dir.exist?(dir_path) |