parent
bcc848d773
commit
629c6494a5
1 changed files with 2 additions and 4 deletions
|
@ -64,7 +64,7 @@ import System.Directory (Permissions (..), doesFileExist, findExecutable,
|
||||||
import System.Environment (getArgs, getEnvironment, getProgName)
|
import System.Environment (getArgs, getEnvironment, getProgName)
|
||||||
import System.Exit (ExitCode (..), exitSuccess)
|
import System.Exit (ExitCode (..), exitSuccess)
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
import System.IO (stderr, stdout)
|
import System.IO (stdout)
|
||||||
import System.IO.Error (isDoesNotExistError)
|
import System.IO.Error (isDoesNotExistError)
|
||||||
import Text.Pandoc
|
import Text.Pandoc
|
||||||
import Text.Pandoc.Builder (setMeta)
|
import Text.Pandoc.Builder (setMeta)
|
||||||
|
@ -448,9 +448,7 @@ convertWithOpts opts = do
|
||||||
res <- makePDF pdfprog f writerOptions verbosity media doc'
|
res <- makePDF pdfprog f writerOptions verbosity media doc'
|
||||||
case res of
|
case res of
|
||||||
Right pdf -> writeFnBinary outputFile pdf
|
Right pdf -> writeFnBinary outputFile pdf
|
||||||
Left err' -> liftIO $ do
|
Left err' -> liftIO $
|
||||||
B.hPutStr stderr err'
|
|
||||||
B.hPut stderr $ B.pack [10]
|
|
||||||
E.throwIO $ PandocPDFError (UTF8.toStringLazy err')
|
E.throwIO $ PandocPDFError (UTF8.toStringLazy err')
|
||||||
| otherwise -> do
|
| otherwise -> do
|
||||||
let htmlFormat = format `elem`
|
let htmlFormat = format `elem`
|
||||||
|
|
Loading…
Reference in a new issue