Skip to content
Snippets Groups Projects
Commit 9c69511e authored by Isaac Potoczny-Jones's avatar Isaac Potoczny-Jones
Browse files

added a hook to check test case of unknown param being passed to configure

parent 6cf86a70
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,14 @@
> import Distribution.Compat.Directory (copyFile)
> import System.Directory (removeFile)
> import System.Exit(ExitCode(..))
> import Control.Monad(when)
> myPreConf _ _ = do copyFile "Setup.buildinfo.in" "Setup.buildinfo"
> d <- readPackageDescription hookedPackageDesc
> return $ Just d
> myPreConf (h:_) _ = do when (h /= "--woohoo")
> (error "--woohoo flag (for testing) not passed to ./setup configure.")
> copyFile "Setup.buildinfo.in" "Setup.buildinfo"
> d <- readPackageDescription hookedPackageDesc
> return $ Just d
> myPreConf [] _ = error "--woohoo flag (for testing) not passed to ./setup configure."
> main :: IO ()
> main = defaultMainWithHooks defaultUserHooks
......
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