diff options
author | Lamont Granquist <lamont@chef.io> | 2020-08-03 17:38:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-03 17:38:34 -0700 |
commit | ada22d450e07fe19ae2af12adbdfa4e11177917b (patch) | |
tree | a42120afb91b1d2bd5dd42124c0501bb02ddca53 /lib/chef | |
parent | 69399484afc5e559258dfc7479d70f31843b5859 (diff) | |
download | chef-ada22d450e07fe19ae2af12adbdfa4e11177917b.tar.gz |
Update lib/chef/resource/openssl_x509_certificate.rb
Co-authored-by: pete higgins <pete@peterhiggins.org>
Diffstat (limited to 'lib/chef')
-rw-r--r-- | lib/chef/resource/openssl_x509_certificate.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/chef/resource/openssl_x509_certificate.rb b/lib/chef/resource/openssl_x509_certificate.rb index 4bf9404411..749ee2b273 100644 --- a/lib/chef/resource/openssl_x509_certificate.rb +++ b/lib/chef/resource/openssl_x509_certificate.rb @@ -189,14 +189,12 @@ class Chef action_class do def key_file @key_file ||= - begin - if new_resource.key_file - new_resource.key_file - else - path, file = ::File.split(new_resource.path) - filename = ::File.basename(file, ::File.extname(file)) - path + "/" + filename + ".key" - end + if new_resource.key_file + new_resource.key_file + else + path, file = ::File.split(new_resource.path) + filename = ::File.basename(file, ::File.extname(file)) + path + "/" + filename + ".key" end end |