Fix the URL not showing until the app closes
This commit is contained in:
parent
4a5bfb3b12
commit
0fe8eb0953
1 changed files with 2 additions and 0 deletions
|
@ -137,6 +137,7 @@ firstRun listenhost = do
|
||||||
mainthread v url htmlshim
|
mainthread v url htmlshim
|
||||||
| isJust listenhost = do
|
| isJust listenhost = do
|
||||||
putStrLn url
|
putStrLn url
|
||||||
|
hFlush stdout
|
||||||
go
|
go
|
||||||
| otherwise = do
|
| otherwise = do
|
||||||
browser <- maybe Nothing webBrowser <$> Git.Config.global
|
browser <- maybe Nothing webBrowser <$> Git.Config.global
|
||||||
|
@ -154,6 +155,7 @@ firstRun listenhost = do
|
||||||
openBrowser :: Maybe FilePath -> FilePath -> Maybe Handle -> Maybe Handle -> IO ()
|
openBrowser :: Maybe FilePath -> FilePath -> Maybe Handle -> Maybe Handle -> IO ()
|
||||||
openBrowser mcmd htmlshim outh errh = do
|
openBrowser mcmd htmlshim outh errh = do
|
||||||
hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url
|
hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url
|
||||||
|
hFlush stdout
|
||||||
environ <- cleanEnvironment
|
environ <- cleanEnvironment
|
||||||
(_, _, _, pid) <- createProcess p
|
(_, _, _, pid) <- createProcess p
|
||||||
{ env = environ
|
{ env = environ
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue