Skip to content

Commit

Permalink
Fixed out-of-range in Number Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Jguer committed Apr 9, 2017
1 parent 55bb419 commit 47a0613
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cmd/yay/yay.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func parser() (op string, options []string, packages []string, err error) {
case "--topdown":
util.SortMode = util.TopDown
case "--complete":
if len(os.Args) > i + 3 {
if len(os.Args) > i+3 {
util.Shell = os.Args[i+2]
}
yay.Complete()
Expand Down Expand Up @@ -121,7 +121,10 @@ func main() {
err = yay.SyncInfo(pkgs, options)
case "yogurt":
util.SearchVerbosity = util.NumberMenu
err = yay.NumberMenu(pkgs, options)

if pkgs != nil {
err = yay.NumberMenu(pkgs, options)
}
default:
err = yay.PassToPacman(op, pkgs, options)
}
Expand Down

0 comments on commit 47a0613

Please sign in to comment.