summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-10-11 15:19:48 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-10-11 15:19:48 -0400
commit2393fb78b21c1f4cdd1cb65136a571e77b23dd73 (patch)
tree5d6f3d5df824a0eb0e6ca1d2f6037b4a8a3c4e94
parent6e06fd371ad897fe9f8c249be1ff1b95d2b6ab29 (diff)
webapp: display message about starting web browser
One reason to do this is that on OSX, it doesn't jump to the web browser when opening a new page. Linux seems ahead in usability here... :P
-rw-r--r--Command/WebApp.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index c14795b5e..205e36341 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -133,8 +133,11 @@ openBrowser :: Maybe FilePath -> FilePath -> IO ()
openBrowser cmd htmlshim = go $ maybe runBrowser runCustomBrowser cmd
where
url = fileUrl htmlshim
- go a = unlessM (a url) $
- error $ "failed to start web browser on url " ++ url
+ go a = do
+ putStrLn ""
+ putStrLn $ "Launching web browser on " ++ url
+ unlessM (a url) $
+ error $ "failed to start web browser"
runCustomBrowser c u = boolSystem c [Param u]
{- web.browser is a generic git config setting for a web browser program -}