mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
Implement config option for provider searching
This commit is contained in:
parent
33d056e9ac
commit
c464af6b9b
4
cmd.go
4
cmd.go
@ -296,6 +296,10 @@ func handleConfig(option, value string) bool {
|
||||
config.SudoLoop = true
|
||||
case "nosudoloop":
|
||||
config.SudoLoop = false
|
||||
case "provides":
|
||||
config.Provides = true
|
||||
case "noprovides":
|
||||
config.Provides = false
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ type Configuration struct {
|
||||
Devel bool `json:"devel"`
|
||||
CleanAfter bool `json:"cleanAfter"`
|
||||
GitClone bool `json:"gitclone"`
|
||||
Provides bool `json:"provides"`
|
||||
}
|
||||
|
||||
var version = "5.688"
|
||||
@ -152,6 +153,7 @@ func defaultSettings(config *Configuration) {
|
||||
config.AnswerEdit = ""
|
||||
config.AnswerUpgrade = ""
|
||||
config.GitClone = true
|
||||
config.Provides = true
|
||||
}
|
||||
|
||||
// Editor returns the preferred system editor.
|
||||
|
@ -9,8 +9,6 @@ import (
|
||||
rpc "github.com/mikkeloscar/aur"
|
||||
)
|
||||
|
||||
const PROVIDES = true
|
||||
|
||||
type target struct {
|
||||
Db string
|
||||
Name string
|
||||
@ -228,10 +226,7 @@ func (dp *depPool) cacheAURPackages(_pkgs stringSet) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
//TODO: config option, maybe --deepsearh but aurman uses that flag for
|
||||
//something else already which might be confusing
|
||||
//maybe --provides
|
||||
if PROVIDES {
|
||||
if config.Provides {
|
||||
err := dp.findProvides(pkgs)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user