diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2020-03-11 19:12:34 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2020-03-11 19:12:34 -0700 |
commit | 34a1d7eec7206029c663d56097ba738a63608c31 (patch) | |
tree | a9d56b7a31a9a14688fc5d3e5d169b9caec8fdc8 /lib/chef/provider | |
parent | dfd018cb04a2eae78e5cd8f7569dff4919e3769a (diff) | |
download | chef-34a1d7eec7206029c663d56097ba738a63608c31.tar.gz |
fix ruby 2.7 encoding bug and add --always-dump-stacktrace option
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/provider')
-rw-r--r-- | lib/chef/provider/file.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/file.rb b/lib/chef/provider/file.rb index 9d9980d2fb..449ab49c90 100644 --- a/lib/chef/provider/file.rb +++ b/lib/chef/provider/file.rb @@ -1,7 +1,7 @@ # # Author:: Adam Jacob (<adam@chef.io>) # Author:: Lamont Granquist (<lamont@chef.io>) -# Copyright:: Copyright 2008-2017, Chef Software Inc. +# Copyright:: Copyright 2008-2020, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -381,7 +381,7 @@ class Chef def update_file_contents do_backup unless needs_creating? - deployment_strategy.deploy(tempfile.path, ::File.realpath(new_resource.path)) + deployment_strategy.deploy(tempfile.path, ::File.realpath(new_resource.path).force_encoding(Chef::Config[:ruby_encoding])) logger.info("#{new_resource} updated file contents #{new_resource.path}") if managing_content? # save final checksum for reporting. |