From cba2942cdaea40a90f9c5cf1c4a7c70ecddbe052 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 30 May 2013 16:27:10 -0400 Subject: [PATCH] Revert "android dupped stderr workaround" This reverts commit 4cc803c73381c4345a7b5fce06f87aea9b4c343e. The stderr fd is also trashed after `am` fails to open the web browser. --- Command/WebApp.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Command/WebApp.hs b/Command/WebApp.hs index ab2e70025d..0a8c62be84 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