From b6e3371b15f54d78e82e8f0cd43c9d786ee24d03 Mon Sep 17 00:00:00 2001 From: Cyril David Date: Wed, 27 Jan 2021 09:41:05 -0800 Subject: [PATCH] fix rules breakage with TextDefaultInput --- internal/cli/rules.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/internal/cli/rules.go b/internal/cli/rules.go index 9ec2e3b0b..7906d8e63 100644 --- a/internal/cli/rules.go +++ b/internal/cli/rules.go @@ -373,7 +373,7 @@ func updateRulesCmd(cli *cli) *cobra.Command { }, RunE: func(cmd *cobra.Command, args []string) error { if shouldPrompt(cmd, ruleID) { - input := prompt.TextInput(ruleID, "Id:", "Id of the rule.", "", true) + input := prompt.TextInput(ruleID, "Id:", "Id of the rule.", true) if err := prompt.AskOne(input, &flags); err != nil { return err @@ -384,7 +384,6 @@ func updateRulesCmd(cli *cli) *cobra.Command { input := prompt.TextInput( "name", "Name:", "Name of the rule. You can change the rule name later in the rule settings.", - "", true) if err := prompt.AskOne(input, &flags); err != nil { @@ -393,7 +392,7 @@ func updateRulesCmd(cli *cli) *cobra.Command { } if shouldPrompt(cmd, ruleScript) { - input := prompt.TextInput(ruleScript, "Script:", "Script of the rule.", "", true) + input := prompt.TextInput(ruleScript, "Script:", "Script of the rule.", true) if err := prompt.AskOne(input, &flags); err != nil { return err @@ -401,7 +400,7 @@ func updateRulesCmd(cli *cli) *cobra.Command { } if shouldPrompt(cmd, ruleOrder) { - input := prompt.TextInput(ruleOrder, "Order:", "Order of the rule.", "0", false) + input := prompt.TextInputDefault(ruleOrder, "Order:", "Order of the rule.", "0", false) if err := prompt.AskOne(input, &flags); err != nil { return err