diff options
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) |