From 80b395293069f673da60de4863cd869c4c23e8e2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Oct 2012 15:19:48 -0400 Subject: [PATCH] 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 --- Command/WebApp.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Command/WebApp.hs b/Command/WebApp.hs index c14795b5e9..205e36341b 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 -}