This commit is contained in:
+13
-3
@@ -1,7 +1,17 @@
|
||||
{-# LANGUAGE DoAndIfThenElse #-}
|
||||
module Main where
|
||||
|
||||
|
||||
import Test.DocTest (mainFromCabal)
|
||||
import System.Environment (getArgs)
|
||||
import System.Environment (getArgs, lookupEnv)
|
||||
import System.IO (stderr, hPutStrLn)
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = mainFromCabal "gyehoek" =<< getArgs
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user