From 4819ea8426ef0dbb7fca3c7ca01b5158f393a846 Mon Sep 17 00:00:00 2001 From: Cyril David Date: Sat, 20 Mar 2021 09:45:35 -0700 Subject: [PATCH] Ask name after fetching rule --- internal/cli/rules.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/cli/rules.go b/internal/cli/rules.go index 5f4394d7b..eec10f1f0 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -280,10 +280,6 @@ auth0 rules update --id rul_d2VSaGlyaW5n --name "My Updated Rule" --enabled=fal } } - if err := ruleName.AskU(cmd, &inputs.Name); err != nil { - return err - } - var rule *management.Rule err := ansi.Waiting(func() error { var err error @@ -294,6 +290,10 @@ auth0 rules update --id rul_d2VSaGlyaW5n --name "My Updated Rule" --enabled=fal return fmt.Errorf("Failed to fetch rule with ID: %s %v", inputs.ID, err) } + if err := ruleName.AskU(cmd, &inputs.Name); err != nil { + return err + } + // TODO(cyx): we can re-think this once we have // `--stdin` based commands. For now we don't have // those yet, so keeping this simple.