Suppress Gimme Cookie prompt when in gopt (-g) authtoken create mode

This commit is contained in:
Russ Magee 2022-09-25 23:23:33 -07:00
parent b2e43f4bad
commit 0913311351
1 changed files with 7 additions and 3 deletions

View File

@ -1007,10 +1007,14 @@ func main() { //nolint: funlen, gocyclo
}) })
if authCookie == "" { if authCookie == "" {
if !gopt {
// No auth token, prompt for password // No auth token, prompt for password
fmt.Printf("Gimme cookie:") fmt.Printf("Gimme cookie:")
}
ab, e := xs.ReadPassword(os.Stdin.Fd()) ab, e := xs.ReadPassword(os.Stdin.Fd())
if !gopt {
fmt.Printf("\r\n") fmt.Printf("\r\n")
}
if e != nil { if e != nil {
panic(e) panic(e)
} }