From f807111bf3e1f3ac36b97c9a1db432402fbfa276 Mon Sep 17 00:00:00 2001 From: Robin KAY Date: Sat, 12 Oct 2013 15:49:20 +0100 Subject: [PATCH] Check that haddock docs build completed before uploading (fixes #119). --- BuildClient.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/BuildClient.hs b/BuildClient.hs index d9f7647a9..1d7e44da3 100644 --- a/BuildClient.hs +++ b/BuildClient.hs @@ -586,8 +586,10 @@ buildPackage verbosity opts config docInfo = do "build-reports.log" handleDoesNotExist (return ()) $ removeFile simple_report_log - docs_generated <- liftM2 (&&) (doesDirectoryExist doc_dir_html) - (doesFileExist (doc_dir_html "doc-index.html")) + docs_generated <- fmap and $ sequence [ + doesDirectoryExist doc_dir_html, + doesFileExist (doc_dir_html "doc-index.html"), + doesFileExist (doc_dir_html display (docInfoPackageName docInfo) <.> "haddock")] if docs_generated then do notice verbosity $ "Docs generated for " ++ display (docInfoPackage docInfo)