{-# LANGUAGE DoAndIfThenElse #-} module Main where import Test.DocTest (mainFromCabal) import System.Environment (getArgs, lookupEnv) import System.IO (stderr, hPutStrLn) main :: IO () main = do nix <- maybe False null <$> lookupEnv "GYEHOEK_IN_NIX_BUILD" if nix then do hPutStrLn stderr "\ \skipping doctests in Nix build environment. \ \see https://github.com/pcapriotti/optparse-applicative/pull/408." else mainFromCabal "gyehoek" =<< getArgs