diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-05-12 21:01:30 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-05-12 21:01:30 -0700 |
commit | 054e6abd0da453ffca04ed443e60d059506ad0eb (patch) | |
tree | e7a3a3bb7ef44b5ab7bc68accd1151fede068a93 /pandoc.hs | |
parent | 5d8d8b0de1ebf1ffd9bdff8086a524a5ff614dff (diff) |
Revert "New method for checking for presence of tex program."
This reverts commit 285bbf61cf2b21278792e48aee7c25fa0ee62faa.
Diffstat (limited to 'pandoc.hs')
-rw-r--r-- | pandoc.hs | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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." |