make sure False is returned on error

This commit is contained in:
Joey Hess 2016-12-17 18:31:19 -04:00
parent def2019602
commit b2b6296f9d
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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)