From 054e6abd0da453ffca04ed443e60d059506ad0eb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 12 May 2016 21:01:30 -0700 Subject: Revert "New method for checking for presence of tex program." This reverts commit 285bbf61cf2b21278792e48aee7c25fa0ee62faa. --- pandoc.hs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'pandoc.hs') diff --git a/pandoc.hs b/pandoc.hs index 76803be43..cb3d1e04a 100644 --- a/pandoc.hs +++ b/pandoc.hs @@ -52,7 +52,6 @@ import Data.Char ( toLower, toUpper ) import Data.List ( delete, intercalate, isPrefixOf, isSuffixOf, sort ) import System.Directory ( getAppUserDataDirectory, findExecutable, doesFileExist, Permissions(..), getPermissions ) -import System.Process ( readProcessWithExitCode ) import System.IO ( stdout, stderr ) import System.IO.Error ( isDoesNotExistError ) import qualified Control.Exception as E @@ -1402,11 +1401,8 @@ convertWithOpts opts args = do _ | html5Output -> "wkhtmltopdf" _ -> latexEngine -- check for pdf creating program - (ec,_,_) <- E.catch - (readProcessWithExitCode pdfprog ["--version"] "") - (\(_ :: E.SomeException) -> - return (ExitFailure 1,"","")) - when (ec /= ExitSuccess) $ + mbPdfProg <- findExecutable pdfprog + when (isNothing mbPdfProg) $ err 41 $ pdfprog ++ " not found. " ++ pdfprog ++ " is needed for pdf output." -- cgit v1.2.3