diff options
Diffstat (limited to 'Utility/Process.hs')
-rw-r--r-- | Utility/Process.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/Process.hs b/Utility/Process.hs index 1e93569be..839cc4078 100644 --- a/Utility/Process.hs +++ b/Utility/Process.hs @@ -101,14 +101,14 @@ writeReadProcessEnv cmd args environ input = do , env = environ } -{- Waits for a ProcessHandle, and throws an exception if the process +{- Waits for a ProcessHandle, and throws an IOError if the process - did not exit successfully. -} forceSuccessProcess :: CreateProcess -> ProcessHandle -> IO () forceSuccessProcess p pid = do code <- waitForProcess pid case code of ExitSuccess -> return () - ExitFailure n -> error $ showCmd p ++ " exited " ++ show n + ExitFailure n -> fail $ showCmd p ++ " exited " ++ show n {- Waits for a ProcessHandle and returns True if it exited successfully. -} checkSuccessProcess :: ProcessHandle -> IO Bool |