提交 68cc00b6 编写于 作者: V Vidar Holen

Exit with 1 on comments and 2 on failure

上级 8b7c0be0
......@@ -211,8 +211,12 @@ getOption (_:rest) flag def = getOption rest flag def
main = do
args <- getArgs
parsedArgs <- parseArguments args
status <- process parsedArgs
if status then exitSuccess else exitFailure
do
status <- process parsedArgs
if status then exitSuccess else exitWith (ExitFailure 1)
`catch` \err -> do
printErr $ show err
exitWith $ ExitFailure 2
process Nothing = return False
process (Just (options, files)) =
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册