mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
Rakefile: fix reporting xsltproc errors
Older versions used to exit with code 0 even in the case of an error. Newer versions exit with <> 0. Handle that case and output the emitted lines.
This commit is contained in:
parent
977e362303
commit
2b7e782202
10
Rakefile
10
Rakefile
@ -314,15 +314,19 @@ end
|
||||
# man pages from DocBook XML
|
||||
rule '.1' => '.xml' do |t|
|
||||
filter = lambda do |code, lines|
|
||||
if (0 == code) && lines.any? { |line| /^error/i.match(line) }
|
||||
if (0 == code) && lines.any? { |line| /^error|parser error/i.match(line) }
|
||||
File.unlink(t.name) if File.exists?(t.name)
|
||||
result = 1
|
||||
|
||||
elsif 0 != code
|
||||
result = code
|
||||
puts lines.join('')
|
||||
|
||||
else
|
||||
result = 0
|
||||
puts lines.join('') if $verbose
|
||||
end
|
||||
|
||||
puts lines.join('') if $verbose
|
||||
|
||||
result
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user