Skip to content

Commit 702236c

Browse files
committed
Debug
1 parent cd8b608 commit 702236c

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

tool/lib/output.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,19 @@ def write(data, overwrite: @overwrite, create_only: @create_only, name: nil, qui
5252
written = false
5353
else
5454
unless overwrite and outpath and (File.binwrite(outpath, data) rescue nil)
55-
File.binwrite(outpath = name, data)
55+
begin
56+
File.binwrite(outpath = name, data)
57+
rescue
58+
puts "ifchange=#{@ifchange} overwrite=#{overwrite} create_only=#{create_only}"
59+
puts "outpath=#{outpath}"
60+
if original
61+
puts "original:"
62+
puts original.gsub(/^/, "| ")
63+
end
64+
puts "data:"
65+
puts data.gsub(/^/, "| ")
66+
raise
67+
end
5668
end
5769
puts "#{outpath} #{updated}" unless quiet
5870
written = true

0 commit comments

Comments
 (0)