Skip to content
Snippets Groups Projects
Commit 90f56898 authored by Alexis Williams's avatar Alexis Williams
Browse files

Fix new-clean on clean project (closes #5470)

parent 7fdf646e
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ import Distribution.Simple.Setup
import Distribution.Simple.Command
( CommandUI(..), option, reqArg )
import Distribution.Simple.Utils
( info, die', wrapText )
( info, die', wrapText, handleDoesNotExist )
import Distribution.Verbosity
( Verbosity, normal )
......@@ -95,13 +95,13 @@ cleanAction CleanFlags{..} extraArgs _ = do
when buildRootExists $ do
info verbosity ("Deleting build root (" ++ buildRoot ++ ")")
removeDirectoryRecursive buildRoot
handleDoesNotExist () $ removeDirectoryRecursive buildRoot
when unpackedSrcRootExists $ do
info verbosity ("Deleting unpacked source root (" ++ unpackedSrcRoot ++ ")")
removeDirectoryRecursive unpackedSrcRoot
handleDoesNotExist () $ removeDirectoryRecursive unpackedSrcRoot
else do
let distRoot = distDirectory distLayout
info verbosity ("Deleting dist-newstyle (" ++ distRoot ++ ")")
removeDirectoryRecursive distRoot
handleDoesNotExist () $ removeDirectoryRecursive distRoot
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment