diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-03-09 09:26:25 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-03-09 09:26:25 -0800 |
commit | ef9b8c3ede0a5c97a9c9502fe00b79a9068aaeac (patch) | |
tree | b3ad957bcbdbb6c59c2c3600da564609886938e9 /src/Text | |
parent | 6173c3c83082070ff1b6063ca9fda77822f79087 (diff) | |
download | pandoc-ef9b8c3ede0a5c97a9c9502fe00b79a9068aaeac.tar.gz |
Raise error if someone tries to print docx, odt, etc. template.
Closes #4441.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/App.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 26c754cd6..a98a9c670 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -967,6 +967,9 @@ options = setUserDataDir Nothing getDefaultTemplate arg case templ of + Right "" -> do -- e.g. for docx, odt, json: + E.throwIO $ PandocCouldNotFindDataFileError + ("templates/default." ++ arg) Right t -> UTF8.hPutStr stdout t Left e -> E.throwIO e exitSuccess) |