Skip to content

Commit

Permalink
fix picked preset
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriciojs committed Oct 28, 2023
1 parent 05ba542 commit df2f0c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions commands/preset.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ an interactive wizard will present the available options.`,
return
}

func (p *KoolPreset) getPreset(args []string) (preset string, err error) {
func (p *KoolPreset) getPreset(args []string) (pickedPreset string, err error) {
if len(args) == 1 {
preset = args[0]
pickedPreset = args[0]
return
}

Expand All @@ -100,9 +100,9 @@ func (p *KoolPreset) getPreset(args []string) (preset string, err error) {

sort.Strings(presets)

var pickedPreset string

pickedPreset, err = p.promptSelect.Ask("What preset do you want to use", presets)
if pickedPreset, err = p.promptSelect.Ask("What preset do you want to use", presets); err != nil {
return
}

for preset, name := range availablePresets {
if name == pickedPreset {
Expand Down

0 comments on commit df2f0c3

Please sign in to comment.