Un-ignore coreIO error-numbers when processing one file only

pull/136/head
Lennart Spitzner 2018-04-05 21:05:19 +02:00
parent 24886e818a
commit 62d066d496
1 changed files with 4 additions and 3 deletions

View File

@ -183,9 +183,10 @@ mainCmdParser helpDesc = do
trace (showConfigYaml config) $ return ()
results <- zipWithM (coreIO putStrErrLn config suppressOutput) inputPaths outputPaths
case sequence_ results of
Left _ -> System.Exit.exitWith (System.Exit.ExitFailure 1)
Right _ -> pure ()
case results of
xs | all Data.Either.isRight xs -> pure ()
[Left x] -> System.Exit.exitWith (System.Exit.ExitFailure x)
_ -> System.Exit.exitWith (System.Exit.ExitFailure 1)
-- | The main IO parts for the default mode of operation, and after commandline