提交 9439eee9 编写于 作者: M Mislav Marohnić

Avoid showing warning about invalid 2FA code on first prompt

上级 05b19f69
......@@ -53,7 +53,9 @@ func (c *Config) PromptForHost(host string) (h *Host, err error) {
}
if ae, ok := err.(*AuthError); ok && ae.IsRequired2FACodeError() {
fmt.Fprintln(os.Stderr, "warning: invalid two-factor code")
if (code != "") {
fmt.Fprintln(os.Stderr, "warning: invalid two-factor code")
}
code = c.PromptForOTP()
} else {
break
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册