Files
gyehoek-hs/test/doctest.hs
T
2026-08-24 01:12:34 -06:00

18 lines
475 B
Haskell

{-# 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