Skip to content

Commit

Permalink
Merge pull request #78 from auth0/fix-rules-breakage
Browse files Browse the repository at this point in the history
fix rules breakage with TextDefaultInput
  • Loading branch information
cyx authored Jan 27, 2021
2 parents 2a8b23f + b6e3371 commit 9b72ad8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/cli/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -393,15 +392,15 @@ 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
}
}

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
Expand Down

0 comments on commit 9b72ad8

Please sign in to comment.