Skip to content

Commit 99b7297

Browse files
committed
write error dumps to file_cache_path
1 parent fbc8154 commit 99b7297

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎chef/lib/chef/application.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def apply_config(config_file_path)
127127
class << self
128128
def debug_stacktrace(e)
129129
message = "#{e.class}: #{e}\n#{e.backtrace.join("\n")}"
130-
filename = File.join(Dir.tmpdir, "chef-stacktrace.out")
130+
filename = File.join(Chef::Config[:file_cache_path], "chef-stacktrace.out")
131131
Chef::Log.fatal("Stacktrace dumped to #{filename}")
132132
Chef::Log.debug(message)
133133
chef_stacktrace_out = File.open(filename, "w")

‎chef/lib/chef/handler/error_report.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def report
3232
end
3333

3434
def report_path
35-
File.join(Dir.tmpdir, "failed-run-data.json")
35+
File.join(Chef::Config[:file_cache_path], "failed-run-data.json")
3636
end
3737

3838
end

0 commit comments

Comments
 (0)