summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-13 13:47:09 -0800
committerTim Smith <tsmith@chef.io>2018-11-13 20:41:32 -0800
commitce934beeb31d2a88305e0443c9ba73d2d66b63d1 (patch)
treebbcf4620d1d767d42147c8d7ea31f51273a331c5
parentd0ab58b7daa177e30dea91655790bc2be7f91ec3 (diff)
downloadchef-ce934beeb31d2a88305e0443c9ba73d2d66b63d1.tar.gz
Replace usage of win_friendly_path helper in windows_certificatewin_friendly_path
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.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_certificate.rb b/lib/chef/resource/windows_certificate.rb
index afb69703a8..053a67e3e0 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"
@@ -179,7 +180,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}\""