From a33f7bf3b258ef75e9775cf4fb9b5cf59fce563f Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Sun, 13 Apr 2025 15:31:28 -0700 Subject: [PATCH] fix: reverts confirm password --- internal/support/cli/generate_command.go | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/internal/support/cli/generate_command.go b/internal/support/cli/generate_command.go index 02f91e90..bba1bb1d 100644 --- a/internal/support/cli/generate_command.go +++ b/internal/support/cli/generate_command.go @@ -11,12 +11,11 @@ import ( ) type GenerateCmd struct { - Username string `arg:"positional"` - Password string `arg:"--password, -p" help:"sets the password for the user"` - SkipConfirm bool `arg:"--skip-confirm" help:"skip password confirmation prompt"` - Name string `arg:"--name, -n" help:"sets the display name for the user"` - Email string `arg:"--email, -e" help:"sets the email for the user"` - Filter string `arg:"--user-filter" help:"sets the filter for the user. This can be a comma separated list of filters."` + Username string `arg:"positional"` + Password string `arg:"--password, -p" help:"sets the password for the user"` + Name string `arg:"--name, -n" help:"sets the display name for the user"` + Email string `arg:"--email, -e" help:"sets the email for the user"` + Filter string `arg:"--user-filter" help:"sets the filter for the user. This can be a comma separated list of filters."` } func (g *GenerateCmd) Run(args Args, embeddedCerts embed.FS) error { @@ -27,15 +26,6 @@ func (g *GenerateCmd) Run(args Args, embeddedCerts embed.FS) error { return fmt.Errorf("username and password are required") } - if !args.Generate.SkipConfirm { - fmt.Print("Confirm password: ") - var confirmPassword string - fmt.Scanln(&confirmPassword) - if confirmPassword != args.Generate.Password { - return fmt.Errorf("passwords do not match") - } - } - buffer := auth.GenerateUsers(auth.User{ Username: args.Generate.Username, Password: args.Generate.Password,