From 5553700c9e5e9cb96964cce41cb2eff019b19643 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Fri, 3 Sep 2021 23:44:22 -0300 Subject: [PATCH] Honor force flag in login confirm prompt --- internal/cli/utils_shared.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/internal/cli/utils_shared.go b/internal/cli/utils_shared.go index 5976257ab..6f824cb6c 100644 --- a/internal/cli/utils_shared.go +++ b/internal/cli/utils_shared.go @@ -14,8 +14,8 @@ import ( "github.com/auth0/auth0-cli/internal/auth/authutil" "github.com/auth0/auth0-cli/internal/auth0" "github.com/auth0/auth0-cli/internal/prompt" - "gopkg.in/auth0.v5/management" "github.com/pkg/browser" + "gopkg.in/auth0.v5/management" ) const ( @@ -98,9 +98,12 @@ func runLoginFlowPreflightChecks(cli *cli, c *management.Client) (abort bool) { cli.renderer.Warnf("If you do not wish to modify the client, you can abort now.\n") } - if confirmed := prompt.Confirm("Do you wish to proceed?"); !confirmed { - return false + if !cli.force { + if confirmed := prompt.Confirm("Do you wish to proceed?"); !confirmed { + return false + } } + fmt.Fprint(cli.renderer.MessageWriter, "\n") return true