assistant: Detect when system is not configured with a user name, and set environment to prevent git from failing.

This commit is contained in:
Joey Hess 2013-01-06 13:34:08 -04:00
parent 24df1f6ee0
commit 13d2fffb2d
4 changed files with 35 additions and 1 deletions

View file

@ -151,6 +151,7 @@ import Assistant.Threads.XMPPClient
#else
#warning Building without the webapp. You probably need to install Yesod..
#endif
import Assistant.Environment
import qualified Utility.Daemon
import Utility.LogFile
import Utility.ThreadScheduler
@ -178,6 +179,7 @@ startDaemon assistant foreground webappwaiter
startAssistant :: Bool -> (IO () -> IO ()) -> Maybe (String -> FilePath -> IO ()) -> Annex ()
startAssistant assistant daemonize webappwaiter = withThreadState $ \st -> do
checkCanWatch
when assistant $ checkEnvironment
dstatus <- startDaemonStatus
liftIO $ daemonize $
flip runAssistant go =<< newAssistantData st dstatus