mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-01-12 13:14:38 +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
|
# man pages from DocBook XML
|
||||||
rule '.1' => '.xml' do |t|
|
rule '.1' => '.xml' do |t|
|
||||||
filter = lambda do |code, lines|
|
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)
|
File.unlink(t.name) if File.exists?(t.name)
|
||||||
result = 1
|
result = 1
|
||||||
|
|
||||||
|
elsif 0 != code
|
||||||
|
result = code
|
||||||
|
puts lines.join('')
|
||||||
|
|
||||||
else
|
else
|
||||||
result = 0
|
result = 0
|
||||||
|
puts lines.join('') if $verbose
|
||||||
end
|
end
|
||||||
|
|
||||||
puts lines.join('') if $verbose
|
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user