print ask passwd prompt to stderr

This commit is contained in:
2026-07-06 14:15:46 +02:00
parent c855a7ebbe
commit 2fed42fbf4

View File

@@ -113,7 +113,7 @@ func (cluster *Cluster) CheckAuth() error {
cluster.Pass = pass cluster.Pass = pass
} else { } else {
// k, try interactively // k, try interactively
fmt.Printf("Enter password for elasticsearch user %s@%s: ", cluster.User, cluster.Name) fmt.Fprintf(os.Stderr, "Enter password for elasticsearch user %s@%s: ", cluster.User, cluster.Name)
pass, err := term.ReadPassword(int(syscall.Stdin)) pass, err := term.ReadPassword(int(syscall.Stdin))
if err != nil { if err != nil {
return err return err