]> gitweb.michael.orlitzky.com - dead/halcyon.git/blobdiff - src/OptionalConfiguration.hs
Add the Unix module and enable daemonization.
[dead/halcyon.git] / src / OptionalConfiguration.hs
index fca9e58eca283abfa8d45912a71dfee3baa03b39..17c7191dead04be9265ec82e91604a730034ebb0 100644 (file)
@@ -113,12 +113,13 @@ instance Monoid OptionalCfg where
 --
 from_rc :: IO OptionalCfg
 from_rc = do
-  etc  <- catchIOError getSysconfDir (\e -> do
-                                        hPutStrLn stderr (show e)
-                                        return "/etc")
-  home <- catchIOError getHomeDirectory (\e -> do
-                                           hPutStrLn stderr (show e)
-                                           return "$(HOME)")
+  etc  <- catchIOError
+            getSysconfDir (\e -> do hPutStrLn stderr ("ERROR: " ++ (show e))
+                                    return "/etc")
+  home <- catchIOError
+            getHomeDirectory (\e -> do hPutStrLn stderr ("ERROR: " ++ (show e))
+                                       return "$(HOME)")
+
   let global_config_path = etc </> "halcyonrc"
   let user_config_path = home </> ".halcyonrc"
   cfg <- DC.load [ DC.Optional global_config_path,