Skip to content

Commit ea63b62

Browse files
committed
test: fix test on windows ci
1 parent 10619dc commit ea63b62

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/Control/Carrier/Logger/IOSpec.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{-# LANGUAGE OverloadedStrings #-}
2+
{-# LANGUAGE TypeApplications #-}
23

34
module Control.Carrier.Logger.IOSpec (
45
spec,
56
) where
67

8+
import Control.Exception (try, IOException)
79
import Control.Carrier.Lift (runM)
810
import Control.Carrier.Logger.IO (runLoggerIO, singleHandle)
911
import Control.Monad.Logger (logDebugN, logInfoN, logWarnN)
@@ -17,7 +19,7 @@ spec = do
1719
(fp, h) <- openTempFile "." "LoggerIOC.log"
1820
_ <- runM (runLoggerIO (singleHandle h) action)
1921
hClose h
20-
readFile fp <* removePathForcibly fp
22+
readFile fp <* (try @IOException (removePathForcibly fp))
2123

2224
describe "LoggerIOC" $ do
2325
it "no log" $ do

0 commit comments

Comments
 (0)