Revert "New method for checking for presence of tex program."

This reverts commit 285bbf61cf.
This commit is contained in:
John MacFarlane 2016-05-12 21:01:30 -07:00
parent 5d8d8b0de1
commit 054e6abd0d
2 changed files with 3 additions and 8 deletions

View file

@ -425,8 +425,7 @@ Executable pandoc
aeson >= 0.7.0.5 && < 0.12,
yaml >= 0.8.8.2 && < 0.9,
containers >= 0.1 && < 0.6,
HTTP >= 4000.0.5 && < 4000.4,
process >= 1.0 && < 1.5
HTTP >= 4000.0.5 && < 4000.4
if flag(network-uri)
Build-Depends: network-uri >= 2.6 && < 2.7, network >= 2.6
else

View file

@ -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."