mirror of
https://github.com/Jguer/yay
synced 2024-09-30 05:13:33 +00:00
fix(dep_graph): fix panic on selecting AUR providers (#2333)
This commit fixes https://github.com/Jguer/yay/issues/2289 by making `provideMenu` returns the first option when it receives an error input from the user (e.g. user sends EOF). Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
parent
643830fccd
commit
d23e8925fa
|
@ -749,7 +749,7 @@ func (g *Grapher) provideMenu(dep string, options []aur.Pkg) *aur.Pkg {
|
|||
if err != nil {
|
||||
g.logger.Errorln(err)
|
||||
|
||||
break
|
||||
return &options[0]
|
||||
}
|
||||
|
||||
if numberBuf == "" {
|
||||
|
@ -772,8 +772,6 @@ func (g *Grapher) provideMenu(dep string, options []aur.Pkg) *aur.Pkg {
|
|||
|
||||
return &options[num-1]
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func makeAURPKGFromSrcinfo(dbExecutor db.Executor, srcInfo *gosrc.Srcinfo) ([]*aur.Pkg, error) {
|
||||
|
|
Loading…
Reference in a new issue