Skip to content

Commit

Permalink
Merge pull request #1443 from kmuto/idgxml-errout
Browse files Browse the repository at this point in the history
IDGXMLMaker: print stderr messages from filter program
  • Loading branch information
kmuto authored Dec 25, 2019
2 parents 9c9a557 + be89569 commit 03a7444
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 03a7444

Please sign in to comment.