Skip to content

Commit

Permalink
Exit with 1 on comments and 2 on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
koalaman committed Nov 15, 2013
1 parent 8b7c0be commit 68cc00b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shellcheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)) =
Expand Down

0 comments on commit 68cc00b

Please sign in to comment.