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