@@ -1,4 +1,4 @@
1−{-# LANGUAGE CPP, TupleSections #-}
1+{-# LANGUAGE CPP, TupleSections, ScopedTypeVariables #-}
22{-
33Copyright (C) 2006-2016 John MacFarlane <jgm@berkeley.edu>
44
@@ -1402,7 +1402,10 @@ convertWithOpts opts args = do
14021402 _ | html5Output -> "wkhtmltopdf"
14031403 _ -> latexEngine
14041404 -- check for pdf creating program
1405− (ec,_,_) <- readProcessWithExitCode pdfprog ["--version"] ""
1405+ (ec,_,_) <- E.catch
1406+ (readProcessWithExitCode pdfprog ["--version"] "")
1407+ (\(_ :: E.SomeException) ->
1408+ return (ExitFailure 1,"",""))
14061409 when (ec /= ExitSuccess) $
14071410 err 41 $ pdfprog ++ " not found. " ++
14081411 pdfprog ++ " is needed for pdf output."