Revert "android dupped stderr workaround"

This reverts commit 4cc803c733.

The stderr fd is also trashed after `am` fails to open the web browser.
This commit is contained in:
Joey Hess 2013-05-30 16:27:10 -04:00
parent 13bf70107e
commit cba2942cda

View file

@ -164,7 +164,7 @@ openBrowser mcmd htmlshim realurl outh errh = do
{- The Android app has a menu item that opens this file. -} {- The Android app has a menu item that opens this file. -}
writeFile "/sdcard/git-annex.home/.git-annex-url" realurl writeFile "/sdcard/git-annex.home/.git-annex-url" realurl
#endif #endif
toconsole $ "Launching web browser on " ++ url hPutStrLn (fromMaybe stdout outh) $ "Launching web browser on " ++ url
hFlush stdout hFlush stdout
environ <- cleanEnvironment environ <- cleanEnvironment
(_, _, _, pid) <- createProcess p (_, _, _, pid) <- createProcess p
@ -174,12 +174,11 @@ openBrowser mcmd htmlshim realurl outh errh = do
} }
exitcode <- waitForProcess pid exitcode <- waitForProcess pid
unless (exitcode == ExitSuccess) $ do unless (exitcode == ExitSuccess) $ do
toconsole "failed to start web browser" hPutStrLn (fromMaybe stderr errh) "failed to start web browser"
#ifdef __ANDROID__ #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 #endif
where where
toconsole = hPutStrLn (fromMaybe stdout outh)
p = case mcmd of p = case mcmd of
Just cmd -> proc cmd [htmlshim] Just cmd -> proc cmd [htmlshim]
Nothing -> browserProc url Nothing -> browserProc url