From 8c9361e4ba6e2257f2bd9d354a56005318477ed6 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Tue, 30 Jul 2019 02:16:19 +0200 Subject: Support cabal-file not being in pkgdir with cabal-v1 --- lib/Distribution/Helper/Discover.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Distribution/Helper') 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) = -- cgit v1.2.3