diff options
Diffstat (limited to 'src/Text/Pandoc/App.hs')
-rw-r--r-- | src/Text/Pandoc/App.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 68bdc1432..0d4a82b70 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -218,7 +218,8 @@ convertWithOpts opts = do templ <- case optTemplate opts of _ | not standalone -> return Nothing Nothing -> do - deftemp <- getDefaultTemplate datadir format + deftemp <- runIO $ + getDefaultTemplate datadir format case deftemp of Left e -> E.throwIO e Right t -> return (Just t) @@ -991,10 +992,10 @@ options = , Option "D" ["print-default-template"] (ReqArg (\arg _ -> do - templ <- getDefaultTemplate Nothing arg + templ <- runIO $ getDefaultTemplate Nothing arg case templ of Right t -> UTF8.hPutStr stdout t - Left e -> E.throwIO $ PandocAppError (show e) + Left e -> E.throwIO e exitSuccess) "FORMAT") "" -- "Print default template for FORMAT" |