From 70bb36cfc783a27345aa7eba2c9f89ecce748898 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 25 Sep 2012 22:48:17 -0400 Subject: 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. --- Utility/Process.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Utility') 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 -- cgit v1.2.3