fly: revert "Fix multiple stdin scan in the auto login flow"
This reverts commit
This reverts commit
@@ -9,7 +9,6 @@ import (
"io/ioutil"
"net"
"net/http"
- "os"
"strings"
"github.com/concourse/concourse/atc"
@@ -165,6 +164,7 @@ func (command *LoginCommand) passwordGrant(client concourse.Client, username, pa
}
func (command *LoginCommand) authCodeGrant(targetUrl string) (string, string, error) {
+
var tokenStr string
stdinChannel := make(chan string)
@@ -290,19 +290,6 @@ type tcpKeepAliveListener struct {
func waitForTokenInput(tokenChannel chan string, errorChannel chan error) {
for {
- if len(tokenChannel) > 0 {
- return
- }
-
- fi, err := os.Stdin.Stat()
- if err != nil {
- errorChannel <- err
- return
- }
- if fi.Size() <= 0 {
- continue
- }
-
var tokenType string
var tokenValue string
count, err := fmt.Scanf("%s %s", &tokenType, &tokenValue)
