Lynx support: Open browser asynchronous with current tty as stdin/stdout - #97
Lynx support: Open browser asynchronous with current tty as stdin/stdout#97YouDirk wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
Does not work in conjunction with $> printf "host=host.name.org\nprotocol=https\n" | git-credential-oauth getwhich works fine. But inside The issue may be that Greets, Dirk. |
|
Hey, me again =D this pull-request seems to work and is Ready-To-Merge. I have published a test-build at YouDirk/git-credential-oauth/releases/v0.17.2.1 which you can try out ... It seems to work fine. Just install Greets, Dirk =D |
This patch enables the option to login using the minimalistic console browser Lynx, if xdg-open is running it as default browser. Useful on remote machines without X-forwarding or VNC. How it works ************ Browsers stdin/stdout are outputting/reading to/from TTY if OS is Linux. Browsers are executed asynchronous, then git-credential-oauth is waiting for the response of the temporary HTTP server, followed by WAIT() until the browser was closed (or forked if GUI is available).
|
Once more ready to merge =) ... |
| // Wait here until browser is terminated | ||
| if err := cmd.Wait(); err != nil { | ||
| fmt.Fprintf(os.Stderr, "Browser '%s' terminates with failure: %s\n", open, err) | ||
| } |
There was a problem hiding this comment.
Removing lines 526-529 above could resolve #112 ... Please first merge this and afterwards try to fix #122.
[Edit]: But notice that console browsers like Lynx require termination. Otherwise the tty/console-output of both processes (console browser and git-credential-oauth) will be merged. If this fix #112 then deeper thoughts are required, i.e. browser detection like
if <browser_type> == "console" {
if err := cmd.Wait(); err != nil {
fmt.Fprintf(os.Stderr, "Browser '%s' terminates with failure: %s\n", open, err)
}
}
This patch enables the option to login using the minimalistic console browser Lynx, if xdg-open is running it as default browser. Useful on remote machines without X-forwarding or VNC.