diff --git a/pkg/cmd/user.go b/pkg/cmd/user.go index 7a89466ca..902ac6317 100644 --- a/pkg/cmd/user.go +++ b/pkg/cmd/user.go @@ -361,7 +361,11 @@ var userDeleteCmd = &cobra.Command{ if err != nil { log.Fatalf("could not read confirmation message: %s", err) } - if text != "YES, I CONFIRM\n" { + + // On Windows a newline is \r\n, while on Linux it is only \n. + text = strings.TrimRight(text, "\r\n") + + if text != "YES, I CONFIRM" { log.Fatalf("invalid confirmation message") } }