Skip to content

Commit

Permalink
Added Check
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Oct 4, 2024
1 parent 2720757 commit 142f226
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/cli/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package cli

import (
"fmt"
"os"

"github.com/AlecAivazis/survey/v2/terminal"
"github.com/auth0/go-auth0"
"os"
"reflect"

"github.com/auth0/auth0-cli/internal/prompt"
)
Expand Down Expand Up @@ -59,6 +59,10 @@ func askPassword(i commandInput, value interface{}, isUpdate bool) error {
}

func askMultiSelect(i commandInput, value interface{}, options ...string) error {
v := reflect.ValueOf(options)
if v.Kind() != reflect.Slice || v.Len() <= 0 {
return handleInputError(fmt.Errorf("there is not enough data to select from"))
}
if err := prompt.AskMultiSelect(i.GetLabel(), value, options...); err != nil {
return handleInputError(err)
}
Expand Down

0 comments on commit 142f226

Please sign in to comment.