diff options
author | Tim Smith <tsmith@chef.io> | 2018-11-13 13:47:09 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-11-14 09:58:04 -0800 |
commit | 5ba484fcc43614fe7f3f1f7247636a4bb9abfa1f (patch) | |
tree | 3a370a3f3a09c94e37694633a3b9e3d8fa125b47 | |
parent | b71d86462d28eaeb20049eb81066844c96d6d656 (diff) | |
download | chef-5ba484fcc43614fe7f3f1f7247636a4bb9abfa1f.tar.gz |
Replace usage of win_friendly_path helper in windows_certificate
This is a helper from the windows cookbook that doesn't exist in core
Chef.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/windows_certificate.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb index a5058f07a8..b482a09cc4 100644 --- a/lib/chef/resource/windows_certificate.rb +++ b/lib/chef/resource/windows_certificate.rb @@ -17,6 +17,7 @@ # limitations under the License. # +require "chef/util/path_helper" require "chef/resource" require "win32-certstore" if Chef::Platform.windows? require "openssl" @@ -180,7 +181,7 @@ class Chef def cert_script(persist) cert_script = "$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2" - file = win_friendly_path(new_resource.source) + file = Chef::Util::PathHelper.cleanpath(new_resource.source) cert_script << " \"#{file}\"" if ::File.extname(file.downcase) == ".pfx" cert_script << ", \"#{new_resource.pfx_password}\"" |