Cleanup logging in Cradle

This commit is contained in:
Daniel Gröber
2016-01-09 23:21:59 +01:00
parent 68cd165088
commit bb3333efe3
4 changed files with 21 additions and 13 deletions

View File

@@ -101,15 +101,10 @@ stackCradle wdir = do
-- If dist/setup-config already exists the user probably wants to use cabal
-- rather than stack, or maybe that's just me ;)
whenM (liftIO $ doesFileExist $ cabalDir </> setupConfigPath "dist") $ do
gmLog GmWarning "" $ text "'dist/setup-config' exists, ignoring Stack and using cabal-install instead."
mzero
gmLog GmWarning "" $ text "'dist/setup-config' exists, ignoring Stack and using cabal-install instead."
mzero
senv <- MaybeT $
let handler err@(GMEStackBootstrap _) = do
gmLog GmWarning "" $ gmeDoc err
return Nothing
handler err = throw err
in gcatch (getStackEnv cabalDir) handler
senv <- MaybeT $ getStackEnv cabalDir
return Cradle {
cradleProject = StackProject senv