diff options
| -rw-r--r-- | src/Propellor/DotDir.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Propellor/DotDir.hs b/src/Propellor/DotDir.hs index 100342e8..669ac303 100644 --- a/src/Propellor/DotDir.hs +++ b/src/Propellor/DotDir.hs @@ -78,9 +78,11 @@ cabalSandboxRequired :: IO Bool cabalSandboxRequired = ifM cabal ( do home <- myHomeDir - ls <- lines <$> readFile (home </> ".cabal" </> "config") + ls <- lines <$> catchDefaultIO [] + (readFile (home </> ".cabal" </> "config")) -- For simplicity, we assume a sane ~/.cabal/config here: - return $ "require-sandbox: True" `elem` ls + return $ any ("True" `isInfixOf`) $ + filter ("require-sandbox:" `isPrefixOf`) ls , return False ) where |
