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
This commit is contained in:
parent
4ef6dac5c2
commit
80b3952930
1 changed files with 5 additions and 2 deletions
|
@ -133,8 +133,11 @@ openBrowser :: Maybe FilePath -> FilePath -> IO ()
|
||||||
openBrowser cmd htmlshim = go $ maybe runBrowser runCustomBrowser cmd
|
openBrowser cmd htmlshim = go $ maybe runBrowser runCustomBrowser cmd
|
||||||
where
|
where
|
||||||
url = fileUrl htmlshim
|
url = fileUrl htmlshim
|
||||||
go a = unlessM (a url) $
|
go a = do
|
||||||
error $ "failed to start web browser on url " ++ url
|
putStrLn ""
|
||||||
|
putStrLn $ "Launching web browser on " ++ url
|
||||||
|
unlessM (a url) $
|
||||||
|
error $ "failed to start web browser"
|
||||||
runCustomBrowser c u = boolSystem c [Param u]
|
runCustomBrowser c u = boolSystem c [Param u]
|
||||||
|
|
||||||
{- web.browser is a generic git config setting for a web browser program -}
|
{- web.browser is a generic git config setting for a web browser program -}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue