mirror of https://gogs.blitter.com/RLabs/xs
Suppress Gimme Cookie prompt when in gopt (-g) authtoken create mode
This commit is contained in:
parent
b2e43f4bad
commit
0913311351
4
xs/xs.go
4
xs/xs.go
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue