From ef9b8c3ede0a5c97a9c9502fe00b79a9068aaeac Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 9 Mar 2018 09:26:25 -0800 Subject: Raise error if someone tries to print docx, odt, etc. template. Closes #4441. --- src/Text/Pandoc/App.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) -- cgit v1.2.3