From f0fa42a50e1b875ede5c8733c9bffdac8c81e475 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 28 Nov 2011 16:41:03 -0600 Subject: [PATCH] Fix error check order --- lib/gollum/tex.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gollum/tex.rb b/lib/gollum/tex.rb index 7b0b60c4..f84f02e7 100644 --- a/lib/gollum/tex.rb +++ b/lib/gollum/tex.rb @@ -54,10 +54,10 @@ module Gollum ::File.open(tex_path, 'w') { |f| f.write(Template % formula) } 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 - 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', '-antialias', '-transparent', 'white',