add 'StackProject' around
This commit is contained in:
parent
a285b42206
commit
d660e7cd85
@ -119,7 +119,7 @@ prepareCabalHelper = do
|
|||||||
let projdir = cradleRootDir crdl
|
let projdir = cradleRootDir crdl
|
||||||
distdir = projdir </> cradleDistDir crdl
|
distdir = projdir </> cradleDistDir crdl
|
||||||
readProc <- gmReadProcess
|
readProc <- gmReadProcess
|
||||||
when (cradleProjectType crdl == CabalProject) $
|
when (cradleProjectType crdl == CabalProject || cradleProjectType crdl == StackProject) $
|
||||||
withCabal $ liftIO $ prepare readProc projdir distdir
|
withCabal $ liftIO $ prepare readProc projdir distdir
|
||||||
|
|
||||||
parseCustomPackageDb :: String -> [GhcPkgDb]
|
parseCustomPackageDb :: String -> [GhcPkgDb]
|
||||||
|
@ -27,6 +27,7 @@ debugInfo = do
|
|||||||
cabal <-
|
cabal <-
|
||||||
case cradleProjectType of
|
case cradleProjectType of
|
||||||
CabalProject -> cabalDebug
|
CabalProject -> cabalDebug
|
||||||
|
StackProject -> cabalDebug
|
||||||
_ -> return []
|
_ -> return []
|
||||||
|
|
||||||
pkgOpts <- packageGhcOptions
|
pkgOpts <- packageGhcOptions
|
||||||
|
@ -669,9 +669,10 @@ nukeCaches = do
|
|||||||
chdir <- liftIO $ (</> "cabal-helper") <$> getAppUserDataDirectory "ghc-mod"
|
chdir <- liftIO $ (</> "cabal-helper") <$> getAppUserDataDirectory "ghc-mod"
|
||||||
c <- cradle
|
c <- cradle
|
||||||
|
|
||||||
when (cradleProjectType c == CabalProject) $ do
|
when (cradleProjectType c == CabalProject || cradleProjectType c == StackProject) $ do
|
||||||
let root = cradleRootDir c
|
let root = cradleRootDir c
|
||||||
liftIO $ (trySome . removeDirectoryRecursive) `mapM_` [chdir, root </> "dist"]
|
let dist = cradleDistDir c
|
||||||
|
liftIO $ (trySome . removeDirectoryRecursive) `mapM_` [chdir, root </> dist]
|
||||||
|
|
||||||
trySome :: IO a -> IO (Either SomeException a)
|
trySome :: IO a -> IO (Either SomeException a)
|
||||||
trySome = try
|
trySome = try
|
||||||
|
Loading…
Reference in New Issue
Block a user