From 887ab3c599fe02ef071c26dcb8bb71cd8385b466 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Fri, 14 Aug 2015 06:32:20 +0200 Subject: [PATCH] Don't try to create dist/ in non cabal projects, duh --- Language/Haskell/GhcMod/CabalHelper.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Language/Haskell/GhcMod/CabalHelper.hs b/Language/Haskell/GhcMod/CabalHelper.hs index bf180c8..c9076bb 100644 --- a/Language/Haskell/GhcMod/CabalHelper.hs +++ b/Language/Haskell/GhcMod/CabalHelper.hs @@ -133,7 +133,8 @@ prepareCabalHelper = do let projdir = cradleRootDir crdl distdir = projdir "dist" readProc <- gmReadProcess - withCabal $ liftIO $ prepare readProc projdir distdir + when (cradleProjectType crdl == CabalProject) $ + withCabal $ liftIO $ prepare readProc projdir distdir withCabal :: (IOish m, GmEnv m, GmLog m) => m a -> m a withCabal action = do