diff --git a/CHANGELOG.md b/CHANGELOG.md index 15f3399..08583bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ Which is based on [Keep A Changelog](http://keepachangelog.com/) ## Unreleased +### Fixed + +- Bug in select item + ## v1.2.0 - 2019-09-01 ### Added diff --git a/gpm/cli.go b/gpm/cli.go index adfdeff..6efca31 100644 --- a/gpm/cli.go +++ b/gpm/cli.go @@ -118,11 +118,11 @@ func (c *Cli) selectEntry() Entry { for true { index, err := strconv.Atoi(c.input("Select the entry: ", "", true)) if err == nil && index >= 0 && index+1 <= max { + c1 <- index break } fmt.Println("your choice is not an integer or is out of range") } - c1 <- index }(len(entries)) select {