diff options
author | John McCrae <john.mccrae@progress.com> | 2022-11-11 04:33:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 04:33:55 +0000 |
commit | 77cd0698afb5e079faf700d0e86bd72371eece1a (patch) | |
tree | f5d099c3a4a326e82a7ee700d85fc9efe30a63d6 | |
parent | 3fedb12f895411936bd15f69a921879fd2bb75be (diff) | |
parent | 1a7d8e914e96006052dcaa0f1f1b024e958397d7 (diff) | |
download | chef-77cd0698afb5e079faf700d0e86bd72371eece1a.tar.gz |
Merge pull request #13349 from Stromweld/main
-rw-r--r-- | lib/chef/resource/chef_client_config.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/resource/chef_client_config.rb b/lib/chef/resource/chef_client_config.rb index 916dbffe7e..aa3a041abe 100644 --- a/lib/chef/resource/chef_client_config.rb +++ b/lib/chef/resource/chef_client_config.rb @@ -255,7 +255,7 @@ class Chef action :create, description: "Create a client.rb config file and folders for configuring #{ChefUtils::Dist::Infra::PRODUCT}." do [ new_resource.config_directory, - (::File.dirname(new_resource.log_location) unless new_resource.log_location.nil?), + (::File.dirname(new_resource.log_location) if new_resource.log_location.is_a?(String) && !%w{STDOUT STDERR}.include?(new_resource.log_location) && !new_resource.log_location.empty?), new_resource.file_backup_path, new_resource.file_cache_path, ::File.join(new_resource.config_directory, "client.d"), @@ -265,7 +265,7 @@ class Chef directory dir_path do user new_resource.user unless new_resource.user.nil? group new_resource.group unless new_resource.group.nil? - mode dir_path == ::File.dirname(new_resource.log_location) ? "0755" : "0750" + mode dir_path == ::File.dirname(new_resource.log_location.to_s) ? "0755" : "0750" recursive true end end |