aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Runtime
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2018-10-22 01:20:25 +0200
committerDaniel Gröber <dxld@darkboxed.org>2018-10-27 20:48:56 +0200
commit069225e2e61562c8166a446d201457425b91ce57 (patch)
treeac9ef1123d7b7024f932a16fa67abda283d84153 /src/CabalHelper/Runtime
parente91d57a4655d69b306190506c488450f42391fb3 (diff)
Refactor Unit handling
Diffstat (limited to 'src/CabalHelper/Runtime')
-rw-r--r--src/CabalHelper/Runtime/Main.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/CabalHelper/Runtime/Main.hs b/src/CabalHelper/Runtime/Main.hs
index d0eea1a..70a0cc5 100644
--- a/src/CabalHelper/Runtime/Main.hs
+++ b/src/CabalHelper/Runtime/Main.hs
@@ -263,20 +263,19 @@ main :: IO ()
main = do
args <- getArgs
- projdir:distdir:args' <- case args of
- [] -> usage >> exitFailure
- _ -> return args
+ cfile : distdir : args'
+ <- case args of
+ [] -> usage >> exitFailure
+ _ -> return args
ddexists <- doesDirectoryExist distdir
when (not ddexists) $ do
errMsg $ "distdir '"++distdir++"' does not exist"
exitFailure
- [cfile] <- filter isCabalFile <$> getDirectoryContents projdir
-
v <- maybe silent (const deafening) . lookup "CABAL_HELPER_DEBUG" <$> getEnvironment
lbi <- unsafeInterleaveIO $ getPersistBuildConfig distdir
- gpd <- unsafeInterleaveIO $ readPackageDescription v (projdir </> cfile)
+ gpd <- unsafeInterleaveIO $ readPackageDescription v cfile
let pd = localPkgDescr lbi
let lvd = (lbi, v, distdir)