aboutsummaryrefslogtreecommitdiff
path: root/Utility/Process.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-24 13:59:40 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-24 14:10:11 -0400
commit546f81da19d0b334555edcd773d29c387f19837a (patch)
treebe765669788e04bc66f6d3a349bf1cf5d1f8aa8b /Utility/Process.hs
parentbb64ea64d5e832cc5d044ad283d65ae3ef956d47 (diff)
Revert "convert fail to error"
This reverts commit 7f5fc3ec8f2d274c068e5662d04233bc0169c740. That changed the type of error from an IOError to something else, so broke stuff that was catching IOErrors. So back to a UserError, but be explicit this time that's what it's throwing.
Diffstat (limited to 'Utility/Process.hs')
-rw-r--r--Utility/Process.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Utility/Process.hs b/Utility/Process.hs
index 78755f639..e12b9700e 100644
--- a/Utility/Process.hs
+++ b/Utility/Process.hs
@@ -133,7 +133,8 @@ forceSuccessProcess p pid = do
code <- waitForProcess pid
case code of
ExitSuccess -> return ()
- ExitFailure n -> error $ showCmd p ++ " exited " ++ show n
+ ExitFailure n -> ioError $ userError $
+ showCmd p ++ " exited " ++ show n
-- | Waits for a ProcessHandle and returns True if it exited successfully.
-- Note that using this with createProcessChecked will throw away