From: Keith Fahlgren Date: Tue, 3 Feb 2009 18:31:21 +0000 (+0000) Subject: epubcheck 1.0.3 actually sets an exit code properly, so use that instead of doing... X-Git-Tag: release/1.79.1~6^2~1199 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=920eea06e050557b0387187aef24d8b92cc91ce7;p=docbook-dsssl epubcheck 1.0.3 actually sets an exit code properly, so use that instead of doing nasty output regexp. --- diff --git a/xsl/epub/bin/lib/docbook.rb b/xsl/epub/bin/lib/docbook.rb index 3b622ae37..d4d06aca6 100755 --- a/xsl/epub/bin/lib/docbook.rb +++ b/xsl/epub/bin/lib/docbook.rb @@ -51,7 +51,7 @@ module DocBook cmd = "#{CHECKER} #{file}" output = `#{cmd} 2>&1` - if output == "No errors or warnings detected\n" # TODO wow.. this isn't fragile + if $?.to_i == 0 return false else STDERR.puts output if $DEBUG diff --git a/xsl/epub/bin/spec/epub_realbook_spec.rb b/xsl/epub/bin/spec/epub_realbook_spec.rb index a57149f71..f62f6f149 100755 --- a/xsl/epub/bin/spec/epub_realbook_spec.rb +++ b/xsl/epub/bin/spec/epub_realbook_spec.rb @@ -14,7 +14,7 @@ require 'spec' require 'docbook' -$DEBUG = false +$DEBUG = true TESTDOCSDIR = File.expand_path(File.join(File.dirname(__FILE__), 'files'))