Skip to content

Commit 08b77c5

Browse files
committed
Use removePathForcibly to remove directories
1 parent 7a1c4e2 commit 08b77c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Hedgehog/Extras/Test/Base.hs

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ workspace prefixPath f = GHC.withFrozenCallStack $ do
154154
maybeKeepWorkspace <- H.evalIO $ IO.lookupEnv "KEEP_WORKSPACE"
155155
ws <- H.evalIO $ IO.createTempDirectory systemTemp $ prefixPath <> "-test"
156156
H.annotate $ "Workspace: " <> ws
157-
liftIO $ IO.writeFile (ws </> "module") callerModuleName
157+
H.evalIO $ IO.writeFile (ws </> "module") callerModuleName
158158
f ws
159159
when (IO.os /= "mingw32" && maybeKeepWorkspace /= Just "1") $ do
160-
H.evalIO $ IO.removeDirectoryRecursive ws
160+
H.evalIO $ IO.removePathForcibly ws
161161

162162
-- | Create a workspace directory which will exist for at least the duration of
163163
-- the supplied block.

0 commit comments

Comments
 (0)