aboutsummaryrefslogtreecommitdiff
path: root/lib/Distribution/Helper
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2019-07-30 02:16:19 +0200
committerDaniel Gröber (dxld) <dxld@darkboxed.org>2019-09-17 17:48:26 +0200
commit8c9361e4ba6e2257f2bd9d354a56005318477ed6 (patch)
treedc62b3396268a11550669aa7f43933ca4e4899b7 /lib/Distribution/Helper
parent1b05d896884a8c02306f73f82658e7c6f3825fff (diff)
Support cabal-file not being in pkgdir with cabal-v1
Diffstat (limited to 'lib/Distribution/Helper')
-rw-r--r--lib/Distribution/Helper/Discover.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Distribution/Helper/Discover.hs b/lib/Distribution/Helper/Discover.hs
index a748b25..635474d 100644
--- a/lib/Distribution/Helper/Discover.hs
+++ b/lib/Distribution/Helper/Discover.hs
@@ -52,10 +52,10 @@ findProjects dir = execWriterT $ do
let stackYaml = dir </> "stack.yaml"
whenM (liftIO $ doesFileExist stackYaml) $
tell [Ex $ ProjLocStackYaml stackYaml]
- join $ traverse (tell . pure . Ex . ProjLocV1CabalFile) <$>
+ join $ traverse (tell . pure . Ex . ProjLocV1Dir . takeDirectory) <$>
liftIO (findCabalFiles dir)
-findDistDirs (ProjLocV1CabalFile cabal) =
+findDistDirs (ProjLocV1CabalFile cabal _) =
[DistDirV1 $ replaceFileName cabal "dist/"]
findDistDirs (ProjLocV1Dir dir) = [DistDirV1 $ dir </> "dist/"]
findDistDirs (ProjLocV2File cabal) =