summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-05-30 16:27:10 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-05-30 16:27:10 -0400
commit99ed41c6412d3628a326768b4624173895e2df19 (patch)
tree862a143ffaf11585a139bdbcbc61769855559d69 /Command
parent88f1547a646f93d50cb68ec75a08f14c3841fdf5 (diff)
Revert "android dupped stderr workaround"
This reverts commit 733a90bbd382683fa788aa6949f0fac11ba6504b. The stderr fd is also trashed after `am` fails to open the web browser.
Diffstat (limited to 'Command')
-rw-r--r--Command/WebApp.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/WebApp.hs b/Command/WebApp.hs
index ab2e70025..0a8c62be8 100644
--- a/Command/WebApp.hs
+++ b/Command/WebApp.hs
@@ -164,7 +164,7 @@ openBrowser mcmd htmlshim realurl outh errh = do
{- The Android app has a menu item that opens this file. -}
writeFile "/sdcard/git-annex.home/.git-annex-url" realurl
#endif
- toconsole $ "Launching web browser on " ++ url
+ hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url
hFlush stdout
environ <- cleanEnvironment
(_, _, _, pid) <- createProcess p
@@ -174,12 +174,11 @@ openBrowser mcmd htmlshim realurl outh errh = do
}
exitcode <- waitForProcess pid
unless (exitcode == ExitSuccess) $ do
- toconsole "failed to start web browser"
+ hPutStrLn (fromMaybe stderr errh) "failed to start web browser"
#ifdef __ANDROID__
- toconsole "To open the WebApp, go to the menu and select \"Open WebApp\""
+ hPutStrLn (fromMaybe stderr errh) "To open the WebApp, go to the menu and select \"Open WebApp\""
#endif
where
- toconsole = hPutStrLn (fromMaybe stdout outh)
p = case mcmd of
Just cmd -> proc cmd [htmlshim]
Nothing -> browserProc url