mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 17:17:22 +01:00
Merge pull request #322 from Morganamilo/fix#316
Don't abort during AUR search error
This commit is contained in:
commit
0ccfd1a19f
11
cmd.go
11
cmd.go
@ -360,10 +360,7 @@ func handleRemove() (err error) {
|
||||
|
||||
// NumberMenu presents a CLI for selecting packages to install.
|
||||
func numberMenu(pkgS []string, flags []string) (err error) {
|
||||
aurQ, err := narrowSearch(pkgS, true)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error during AUR search: %s", err)
|
||||
}
|
||||
aurQ, aurErr := narrowSearch(pkgS, true)
|
||||
numaq := len(aurQ)
|
||||
repoQ, numpq, err := queryRepo(pkgS)
|
||||
if err != nil {
|
||||
@ -382,6 +379,12 @@ func numberMenu(pkgS []string, flags []string) (err error) {
|
||||
aurQ.printSearch(numpq + 1)
|
||||
}
|
||||
|
||||
|
||||
if aurErr != nil {
|
||||
fmt.Printf("Error during AUR search: %s\n", aurErr)
|
||||
fmt.Println("Showing repo packages only")
|
||||
}
|
||||
|
||||
fmt.Println(bold(green(arrow + " Packages to install (eg: 1 2 3, 1-3 or ^4)")))
|
||||
fmt.Print(bold(green(arrow + " ")))
|
||||
|
||||
|
10
query.go
10
query.go
@ -130,10 +130,7 @@ func narrowSearch(pkgS []string, sortS bool) (aurQuery, error) {
|
||||
|
||||
// SyncSearch presents a query to the local repos and to the AUR.
|
||||
func syncSearch(pkgS []string) (err error) {
|
||||
aq, err := narrowSearch(pkgS, true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
aq, aurErr := narrowSearch(pkgS, true)
|
||||
pq, _, err := queryRepo(pkgS)
|
||||
if err != nil {
|
||||
return err
|
||||
@ -147,6 +144,11 @@ func syncSearch(pkgS []string) (err error) {
|
||||
aq.printSearch(1)
|
||||
}
|
||||
|
||||
if aurErr != nil {
|
||||
fmt.Printf("Error during AUR search: %s\n", aurErr)
|
||||
fmt.Println("Showing Repo packags only")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user