aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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."