Skip to content

Commit

Permalink
IDGXMLMaker: print stderr messages from filter program
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Dec 25, 2019
1 parent 9c9a557 commit be89569
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/review/idgxmlmaker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ def apply_filter(xmlfile)
ENV['REVIEW_FNAME'] = File.basename(xmlfile).sub(/.xml\Z/, '.re')
begin
o, e, s = Open3.capture3(@filter, stdin_data: File.read(xmlfile))
unless e.empty?
warn("filter error for #{xmlfile}: #{e}")
end
if s.success?
File.write(xmlfile, o) # override
else
warn("filter error for #{xmlfile}: #{e}")
end
rescue => e
warn("filter error for #{xmlfile}: #{e.message}")
Expand Down

0 comments on commit be89569

Please sign in to comment.