diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-08 16:29:29 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2007-01-08 16:29:29 +0000 |
commit | 9eafa971568aa522dcdc798a566069887eee5d30 (patch) | |
tree | 3d260ed0cb619a069ef934a3087a4218679f649a | |
parent | 5dda65b5dc9213f74f7d33777e002fae903d1cd1 (diff) | |
download | pandoc-9eafa971568aa522dcdc798a566069887eee5d30.tar.gz |
Have pandoc return exit code 2 whenever a usage message is
produced, even if it's because a bad option was specified.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@455 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | src/Main.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 32576074b..00923a5cc 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -48,8 +48,8 @@ import Text.Pandoc.Writers.DefaultHeaders ( defaultHtmlHeader, import Text.Pandoc.Definition import Text.Pandoc.Shared import Text.Regex ( mkRegex, matchRegex ) -import System ( exitWith, getArgs, getProgName ) -import System.Exit +import System.Environment ( getArgs, getProgName ) +import System.Exit ( exitWith, ExitCode (..) ) import System.Console.GetOpt import System.IO import Data.Maybe ( fromMaybe ) @@ -361,7 +361,7 @@ main = do name <- getProgName mapM (\e -> hPutStrLn stderr e) errors hPutStr stderr (usageMessage name options) - exitWith $ ExitFailure 3 + exitWith $ ExitFailure 2 else return () |