summaryrefslogtreecommitdiff
path: root/lib/chef/provider
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2020-03-11 19:12:34 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2020-03-11 19:12:34 -0700
commit34a1d7eec7206029c663d56097ba738a63608c31 (patch)
treea9d56b7a31a9a14688fc5d3e5d169b9caec8fdc8 /lib/chef/provider
parentdfd018cb04a2eae78e5cd8f7569dff4919e3769a (diff)
downloadchef-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.rb4
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.