From 3b4394d1a15dc389b303e0c448ec71b8bdae446f Mon Sep 17 00:00:00 2001 From: Michael Christenson II Date: Tue, 5 Dec 2023 12:42:08 -0500 Subject: [PATCH] Check to see if the tenant id is contained in the ids --- internal/cli/apps.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/cli/apps.go b/internal/cli/apps.go index a5abb3fe3..6ebecfa12 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "slices" "strings" "github.com/auth0/go-auth0/management" @@ -328,8 +329,8 @@ func deleteAppCmd(cli *cli) *cobra.Command { } if !cli.force && canPrompt(cmd) { - if tenant, _ := cli.Config.GetTenant(cli.tenant); tenant.ClientID == inputs.ID { - cli.renderer.Warnf("Warning: You're about to delete the client used to authenticate the CLI. If deleted, the CLI will cease to operate once the access token has expired.", inputs.ID) + if tenant, _ := cli.Config.GetTenant(cli.tenant); slices.Contains(ids, tenant.ClientID) { + cli.renderer.Warnf("Warning: You're about to delete the client used to authenticate the CLI. If deleted, the CLI will cease to operate once the access token has expired.", ids) } if confirmed := prompt.Confirm("Are you sure you want to proceed?"); !confirmed { return nil