summaryrefslogtreecommitdiff
path: root/Utility/Process.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-09-25 22:48:17 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-09-25 22:48:17 -0400
commit70bb36cfc783a27345aa7eba2c9f89ecce748898 (patch)
tree0cadb0ec3b996d7ecd830cb98fb5565ec8c29456 /Utility/Process.hs
parent2a850752b27b50e13a306cc4beda7d8fbbea8853 (diff)
Fix fallback to ~/Desktop when xdg-user-dir is not available. Closes: #688833
Really the fix here is to make Utility.Process only throw IOErrors, which is what I naturally assumed it'd throw.
Diffstat (limited to 'Utility/Process.hs')
-rw-r--r--Utility/Process.hs4
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