Fix error check order
This commit is contained in:
+2
-2
@@ -54,10 +54,10 @@ module Gollum
|
|||||||
::File.open(tex_path, 'w') { |f| f.write(Template % formula) }
|
::File.open(tex_path, 'w') { |f| f.write(Template % formula) }
|
||||||
|
|
||||||
result = sh latex_path, '-interaction=batchmode', 'formula.tex', :cwd => path
|
result = sh latex_path, '-interaction=batchmode', 'formula.tex', :cwd => path
|
||||||
raise Error, "`latex` command failed: #{result}" unless ::File.exist?(eps_path)
|
raise Error, "`latex` command failed: #{result}" unless ::File.exist?(dvi_path)
|
||||||
|
|
||||||
result = sh dvips_path, '-o', eps_path, '-E', dvi_path
|
result = sh dvips_path, '-o', eps_path, '-E', dvi_path
|
||||||
raise Error, "`dvips` command failed: #{result}" unless ::File.exist?(dvi_path)
|
raise Error, "`dvips` command failed: #{result}" unless ::File.exist?(eps_path)
|
||||||
result = sh convert_path, '+adjoin',
|
result = sh convert_path, '+adjoin',
|
||||||
'-antialias',
|
'-antialias',
|
||||||
'-transparent', 'white',
|
'-transparent', 'white',
|
||||||
|
|||||||
Reference in New Issue
Block a user