diff options
author | Tim Smith <tsmith@chef.io> | 2018-02-26 10:20:15 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-02-26 10:20:15 -0800 |
commit | 7fa099aeedf0dbb05df6dedf1a1d711c36bd0b83 (patch) | |
tree | 541ff409211dd491230512c1d59d7c2c62deb30b | |
parent | 00b9d510b68e87b77e8d3105280b4e8c8d6d1dbf (diff) | |
download | chef-7fa099aeedf0dbb05df6dedf1a1d711c36bd0b83.tar.gz |
Simplify how we find the fonts directory
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/windows_font.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/windows_font.rb b/lib/chef/resource/windows_font.rb index 495abc787b..a1f7fa153b 100644 --- a/lib/chef/resource/windows_font.rb +++ b/lib/chef/resource/windows_font.rb @@ -79,7 +79,7 @@ class Chef # install the font into the appropriate fonts directory def install_font require "win32ole" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - fonts_dir = WIN32OLE.new("WScript.Shell").SpecialFolders("Fonts") + fonts_dir = Chef::Util::PathHelper.join(ENV["windir"], "fonts") folder = WIN32OLE.new("Shell.Application").Namespace(fonts_dir) converge_by("install font #{new_resource.font_name} to #{fonts_dir}") do folder.CopyHere(Chef::Util::PathHelper.join(ENV["TEMP"], new_resource.font_name)) |