summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Bruno Bigras <bigras.bruno@gmail.com>2013-05-01 15:48:16 +0000
committerGravatar Bruno Bigras <bigras.bruno@gmail.com>2013-05-01 15:48:16 +0000
commit475c88d767be059065bd28346252f19bef2114ad (patch)
tree92ecf37cf34fc489aead0bb2ed311abf46939015 /Command
parenta01fcf0fd73a2a2751e793b0c7bda7008f31aab4 (diff)
Fix the URL not showing until the app closes
Diffstat (limited to 'Command')
-rw-r--r--Command/WebApp.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index f85628d28..da97ed288 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -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