diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2015-06-07 01:17:38 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2015-06-07 01:18:17 +0200 |
commit | 33944fa4347f24ce3e0d02c5e76dbc8d5e595e7c (patch) | |
tree | 6d306dcc05d41973268bdb5b5930b562bf1cd91e | |
parent | 7c4eb4c8bd6f1cc30094c87af8d9e0bc7e178ff8 (diff) |
Fix build
-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" |