mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
Add --gitflags and --[no]gitclone flags
This commit is contained in:
parent
55fe22c430
commit
6d876a738c
6
cmd.go
6
cmd.go
@ -253,10 +253,16 @@ func handleConfig(option, value string) bool {
|
||||
config.AnswerUpgrade = value
|
||||
case "noanswerupgrade":
|
||||
config.AnswerUpgrade = ""
|
||||
case "gitclone":
|
||||
config.GitClone = true
|
||||
case "nogitclone":
|
||||
config.GitClone = false
|
||||
case "gpgflags":
|
||||
config.GpgFlags = value
|
||||
case "mflags":
|
||||
config.MFlags = value
|
||||
case "gitflags":
|
||||
config.GitFlags = value
|
||||
case "builddir":
|
||||
config.BuildDir = value
|
||||
case "editor":
|
||||
|
@ -44,6 +44,7 @@ type Configuration struct {
|
||||
GpgFlags string `json:"gpgflags"`
|
||||
MFlags string `json:"mflags"`
|
||||
SortBy string `json:"sortby"`
|
||||
GitFlags string `json:"gitflags"`
|
||||
RequestSplitN int `json:"requestsplitn"`
|
||||
SearchMode int `json:"-"`
|
||||
SortMode int `json:"sortmode"`
|
||||
@ -52,6 +53,7 @@ type Configuration struct {
|
||||
NoConfirm bool `json:"-"`
|
||||
Devel bool `json:"devel"`
|
||||
CleanAfter bool `json:"cleanAfter"`
|
||||
GitClone bool `json:"gitclone"`
|
||||
}
|
||||
|
||||
var version = "3.373"
|
||||
@ -141,6 +143,7 @@ func defaultSettings(config *Configuration) {
|
||||
config.PacmanConf = "/etc/pacman.conf"
|
||||
config.GpgFlags = ""
|
||||
config.MFlags = ""
|
||||
config.GitFlags = ""
|
||||
config.SortMode = BottomUp
|
||||
config.SortBy = "votes"
|
||||
config.SudoLoop = false
|
||||
@ -154,6 +157,7 @@ func defaultSettings(config *Configuration) {
|
||||
config.AnswerClean = ""
|
||||
config.AnswerEdit = ""
|
||||
config.AnswerUpgrade = ""
|
||||
config.GitClone = true
|
||||
}
|
||||
|
||||
// Editor returns the preferred system editor.
|
||||
|
Loading…
Reference in New Issue
Block a user