summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-05 13:43:56 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-05 13:43:56 -0400
commita82b564462580b46b781df38ff1015685617675a (patch)
tree4ad12859a0a7ce3576b66de2e2bbfe5b3aae5bee
parent478c949dee7a872934fa1e2f99e610978a3eab28 (diff)
webapp: detect on first run if git is not installed, and tell the user, rather than crashing non-informatively
Mostly for Windows, which has no sane package management..
-rw-r--r--Command/WebApp.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index ee5998c9a..91c9afcd0 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -163,7 +163,8 @@ firstRun listenhost = do
hFlush stdout
go
| otherwise = do
- browser <- maybe Nothing webBrowser <$> Git.Config.global
+ browser <- maybe Nothing webBrowser
+ <$> catchDefaultIO Nothing Git.Config.global
openBrowser browser htmlshim url Nothing Nothing
go
where