From 5e79c4394a51300cde3fbbc39e2a40e10d512e66 Mon Sep 17 00:00:00 2001 From: Ken Cochrane Date: Thu, 14 Mar 2013 17:53:10 -0700 Subject: [PATCH] changed scanf's with fscanf's, so it works better for remote --- commands/commands.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/commands.go b/commands/commands.go index c16136412d..681c04961e 100644 --- a/commands/commands.go +++ b/commands/commands.go @@ -84,16 +84,16 @@ func (srv *Server) CmdLogin(stdin io.ReadCloser, stdout io.Writer, args ...strin } fmt.Fprint(stdout, "Username (", authConfig.Username, "): ") - fmt.Scanf("%s", &username) + fmt.Fscanf(stdin, "%s", &username) if username == "" { username = authConfig.Username } if username != authConfig.Username { fmt.Fprint(stdout, "Password: ") - fmt.Scanf("%s", &password) + fmt.Fscanf(stdin, "%s", &password) fmt.Fprint(stdout, "Email (", authConfig.Email, "): ") - fmt.Scanf("%s", &email) + fmt.Fscanf(stdin, "%s", &email) if email == "" { email = authConfig.Email }