Merge pull request #85 from haskell-servant/wip-better-error-doctest-failure
servant, servant-server: handle corner case in doctests, add an helpful error message
This commit is contained in:
commit
09e525fc76
2 changed files with 4 additions and 0 deletions
|
@ -27,3 +27,5 @@ getCabalMacrosFile = do
|
||||||
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
|
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
|
||||||
[x] -> "dist" </> x </> rest
|
[x] -> "dist" </> x </> rest
|
||||||
[] -> "dist" </> rest
|
[] -> "dist" </> rest
|
||||||
|
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
|
||||||
|
++ show xs ++ "\nTry cabal clean"
|
||||||
|
|
|
@ -25,3 +25,5 @@ getCabalMacrosFile = do
|
||||||
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
|
return $ case filter ("dist-sandbox-" `isPrefixOf`) contents of
|
||||||
[x] -> "dist" </> x </> rest
|
[x] -> "dist" </> x </> rest
|
||||||
[] -> "dist" </> rest
|
[] -> "dist" </> rest
|
||||||
|
xs -> error $ "ran doctests with multiple dist/dist-sandbox-xxxxx's: \n"
|
||||||
|
++ show xs ++ "\nTry cabal clean"
|
||||||
|
|
Loading…
Reference in a new issue