From 09133113514953642ce864b09acf57c43aa00851 Mon Sep 17 00:00:00 2001 From: Russ Magee Date: Sun, 25 Sep 2022 23:23:33 -0700 Subject: [PATCH] Suppress Gimme Cookie prompt when in gopt (-g) authtoken create mode --- xs/xs.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xs/xs.go b/xs/xs.go index 3f8823f..b30ea05 100755 --- a/xs/xs.go +++ b/xs/xs.go @@ -1007,10 +1007,14 @@ func main() { //nolint: funlen, gocyclo }) if authCookie == "" { - // No auth token, prompt for password - fmt.Printf("Gimme cookie:") + if !gopt { + // No auth token, prompt for password + fmt.Printf("Gimme cookie:") + } ab, e := xs.ReadPassword(os.Stdin.Fd()) - fmt.Printf("\r\n") + if !gopt { + fmt.Printf("\r\n") + } if e != nil { panic(e) }