mirror of
https://github.com/jgm/pandoc.git
synced 2026-08-26 10:16:32 +00:00
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
This commit is contained in:
+3
-3
@@ -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 ()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user