From b2b6296f9ddcbeeb4043a068bcadea250848603a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Dec 2016 18:31:19 -0400 Subject: [PATCH] make sure False is returned on error --- Utility/MagicWormhole.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Utility/MagicWormhole.hs b/Utility/MagicWormhole.hs index 4e155e6e2a..a71cc69e07 100644 --- a/Utility/MagicWormhole.hs +++ b/Utility/MagicWormhole.hs @@ -124,7 +124,8 @@ wormHoleProcess :: WormHoleParams -> CreateProcess wormHoleProcess = proc "wormhole" . toCommand runWormHoleProcess :: CreateProcess -> (Handle -> Handle -> IO Bool) -> IO Bool -runWormHoleProcess p consumer = bracketOnError setup cleanup go +runWormHoleProcess p consumer = + bracketOnError setup (\v -> cleanup v <&&> return False) go where setup = do (Just hin, Just hout, Nothing, pid)