Inhibit stack support when dist/setup-config exists

This commit is contained in:
Daniel Gröber 2015-08-20 08:43:36 +02:00
parent 8fa3a1e3cf
commit 19e62b0a6a
1 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,12 @@ stackCradle wdir = do
let cabalDir = takeDirectory cabalFile
_stackConfigFile <- MaybeT $ findStackConfigFile cabalDir
-- If dist/setup-config already exists the user probably wants to use cabal
-- rather than stack, or maybe that's just me ;)
mCabalSetupCfg <- mightExist $ setupConfigPath "dist"
when (isJust mCabalSetupCfg) $ mzero
distDir <- MaybeT $ getStackDistDir cabalDir
return Cradle {