servant, servant-server: handle corner case in doctests

They seem to encounter multiple sandboxes sometimes, we now provide a more
helpful error if that happens. Didn't look into why this happens.
This commit is contained in:
Christian Marie 2015-05-16 11:14:24 +10:00
parent 955261ddd3
commit ec55177796
2 changed files with 4 additions and 0 deletions

View file

@ -27,3 +27,5 @@ getCabalMacrosFile = do
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
[x] -> "dist" </> x </> rest
[] -> "dist" </> rest
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
++ show xs ++ "\nTry cabal clean"

View file

@ -25,3 +25,5 @@ getCabalMacrosFile = do
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
[x] -> "dist" </> x </> rest
[] -> "dist" </> rest
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
++ show xs ++ "\nTry cabal clean"