summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-05-12 21:01:30 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-05-12 21:01:30 -0700
commit054e6abd0da453ffca04ed443e60d059506ad0eb (patch)
treee7a3a3bb7ef44b5ab7bc68accd1151fede068a93
parent5d8d8b0de1ebf1ffd9bdff8086a524a5ff614dff (diff)
Revert "New method for checking for presence of tex program."
This reverts commit 285bbf61cf2b21278792e48aee7c25fa0ee62faa.
-rw-r--r--pandoc.cabal3
-rw-r--r--pandoc.hs8
2 files changed, 3 insertions, 8 deletions
diff --git a/pandoc.cabal b/pandoc.cabal
index d1d623060..d38754dcd 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -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
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."