aboutsummaryrefslogtreecommitdiff
path: root/src/CabalHelper/Runtime/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CabalHelper/Runtime/Main.hs')
-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)