summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-14 11:35:38 -0800
committerGitHub <noreply@github.com>2018-11-14 11:35:38 -0800
commit2bade62759145d30e5d2317c3d59ea6b2ce2da79 (patch)
tree8ddd89e80af0378d21a91e3c5903cca5de45f6b1
parent774e36371611bc147895b752ab78b4b21373bffd (diff)
parent5ba484fcc43614fe7f3f1f7247636a4bb9abfa1f (diff)
downloadchef-2bade62759145d30e5d2317c3d59ea6b2ce2da79.tar.gz
Merge pull request #7932 from chef/win_path
Replace usage of win_friendly_path helper in windows_certificate
-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 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}\""