avoid webapp crash on startup when there's no ~/.gitconfig

git config --list --global exits nonzero when there's no global config
This commit is contained in:
Joey Hess 2012-09-23 12:43:14 -04:00
parent 377636850e
commit 582316f66f
2 changed files with 11 additions and 5 deletions

View file

@ -105,7 +105,7 @@ firstRun = do
putMVar v ""
takeMVar v
mainthread v _url htmlshim = do
browser <- webBrowser <$> Git.Config.global
browser <- maybe Nothing webBrowser <$> Git.Config.global
openBrowser browser htmlshim
_wait <- takeMVar v