Skip to content

Commit a73c187

Browse files
committed
GHC 7.0-specific things
1 parent 0b395c0 commit a73c187

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/test/happy-test.cabal

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ library
3838

3939
exposed-modules: Test, SDist
4040
build-depends: base < 5,
41-
process >= 1.2.3.0,
42-
directory >= 1.2.3.0,
43-
filepath >= 1.4.2.0,
41+
process,
42+
directory,
43+
filepath,
4444
transformers >= 0.5.6.2
4545

4646
default-language: Haskell98

packages/test/src/SDist.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module SDist(sdist_test) where
22

33
import Shell
44
import System.FilePath
5+
import System.Directory (setCurrentDirectory)
56
import System.Process
67
import System.IO.Error
78
import System.Exit
@@ -86,7 +87,8 @@ testWithBootstrapping dir executable = do
8687
-- This is less elegant than performing `cabal sdist package` for each package on its own, but is required because `cabal sdist happy` doesn't work on its own - `cabal sdist all` does.
8788
cabalSdistAll :: [String] -> String -> TypedShell [String]
8889
cabalSdistAll packageNames baseDir = do
89-
output <- liftIO $ readCreateProcess ((shell "cabal sdist all") { cwd = Just baseDir }) "" `catchIOError` const (return "")
90+
liftIO $ setCurrentDirectory baseDir
91+
output <- liftIO $ readProcess "cabal" ["sdist", "all"] "" `catchIOError` const (return "")
9092
let fullNames = catMaybes . catMaybes $ map extractFullName $ lines output
9193
let matched = catMaybes $ map (bestMatch fullNames) packageNames
9294
if length packageNames == length matched then return matched else empty

0 commit comments

Comments
 (0)