diff options
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | cabal-helper.cabal | 2 | ||||
-rw-r--r-- | tests/Spec.hs | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml index c11ca62..fffc034 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ ghc: - 7.8 install: + - export HOME=/tmp - cabal update - echo $PATH - which cabal diff --git a/cabal-helper.cabal b/cabal-helper.cabal index 9865c7a..b5518c8 100644 --- a/cabal-helper.cabal +++ b/cabal-helper.cabal @@ -83,3 +83,5 @@ Test-Suite spec GHC-Options: -Wall Build-Depends: base >= 4.5 && < 5 , cabal-helper + , extra + , unix diff --git a/tests/Spec.hs b/tests/Spec.hs index 8665c61..b1a0313 100644 --- a/tests/Spec.hs +++ b/tests/Spec.hs @@ -1,8 +1,10 @@ import Distribution.Helper -import System.Environment +import System.Environment.Extra (lookupEnv) +import System.Posix.Env (setEnv) import Data.Maybe +import Data.Functor main :: IO () main = do - setEnv "HOME" =<< fromMaybe "/tmp" <$> lookupEnv "TMPDIR" + flip (setEnv "HOME") True =<< fromMaybe "/tmp" <$> lookupEnv "TMPDIR" writeAutogenFiles "./dist" |