Fix the URL not showing until the app closes

This commit is contained in:
Bruno Bigras 2013-05-01 15:48:16 +00:00
parent 4a5bfb3b12
commit 0fe8eb0953

View file

@ -137,6 +137,7 @@ firstRun listenhost = do
mainthread v url htmlshim
| isJust listenhost = do
putStrLn url
hFlush stdout
go
| otherwise = do
browser <- maybe Nothing webBrowser <$> Git.Config.global
@ -154,6 +155,7 @@ firstRun listenhost = do
openBrowser :: Maybe FilePath -> FilePath -> Maybe Handle -> Maybe Handle -> IO ()
openBrowser mcmd htmlshim outh errh = do
hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url
hFlush stdout
environ <- cleanEnvironment
(_, _, _, pid) <- createProcess p
{ env = environ