summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file/verification/systemd_unit.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/file/verification/systemd_unit.rb')
-rw-r--r--lib/chef/resource/file/verification/systemd_unit.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/chef/resource/file/verification/systemd_unit.rb b/lib/chef/resource/file/verification/systemd_unit.rb
index 7e4090b5ac..63e8ded89b 100644
--- a/lib/chef/resource/file/verification/systemd_unit.rb
+++ b/lib/chef/resource/file/verification/systemd_unit.rb
@@ -46,6 +46,7 @@ class Chef
def verify(path, opts = {})
return true unless systemd_analyze_path
+
Dir.mktmpdir("chef-systemd-unit") do |dir|
temp = "#{dir}/#{::File.basename(@parent_resource.path)}"
::FileUtils.cp(path, temp)