Skip to content
Snippets Groups Projects
Commit cdac57db authored by Lennart Kolmodin's avatar Lennart Kolmodin
Browse files

Make the qa check return an exit code reporting the status

parent ff6ca203
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ import Distribution.PackageDescription.Configuration ( flattenPackageDescription
import Distribution.Verbosity ( Verbosity )
import Distribution.Simple.Utils ( defaultPackageDesc )
check :: Verbosity -> IO ()
check :: Verbosity -> IO Bool
check verbosity = do
pdfile <- defaultPackageDesc verbosity
ppd <- readPackageDescription verbosity pdfile
......@@ -78,3 +78,4 @@ check verbosity = do
when (null packageChecks) $ do
putStrLn "No errors or warnings could be found in the package."
return (null packageChecks)
......@@ -202,4 +202,7 @@ checkAction :: Flag Verbosity -> [String] -> IO ()
checkAction verbosityFlag extraArgs = do
unless (null extraArgs) $ do
die $ "'check' doesn't take any extra arguments: " ++ unwords extraArgs
Check.check (fromFlag verbosityFlag)
allOk <- Check.check (fromFlag verbosityFlag)
if allOk
then exitWith ExitSuccess
else exitWith (ExitFailure 1)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment