mirror of
https://github.com/Jguer/yay
synced 2024-08-31 05:39:29 +00:00
Add --{no,ask}removemake
This commit is contained in:
parent
0e5cd51910
commit
ec48698f35
6
cmd.go
6
cmd.go
|
@ -326,6 +326,12 @@ func handleConfig(option, value string) bool {
|
|||
mode = ModeAUR
|
||||
case "repo":
|
||||
mode = ModeRepo
|
||||
case "removemake":
|
||||
config.RemoveMake = "yes"
|
||||
case "noremovemake":
|
||||
config.RemoveMake = "no"
|
||||
case "askremovemake":
|
||||
config.RemoveMake = "ask"
|
||||
default:
|
||||
return false
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ type Configuration struct {
|
|||
MFlags string `json:"mflags"`
|
||||
SortBy string `json:"sortby"`
|
||||
GitFlags string `json:"gitflags"`
|
||||
RemoveMake string `json:"removemake"`
|
||||
RequestSplitN int `json:"requestsplitn"`
|
||||
SearchMode int `json:"-"`
|
||||
SortMode int `json:"sortmode"`
|
||||
|
@ -173,6 +174,7 @@ func defaultSettings(config *Configuration) {
|
|||
config.AnswerDiff = ""
|
||||
config.AnswerEdit = ""
|
||||
config.AnswerUpgrade = ""
|
||||
config.RemoveMake = "ask"
|
||||
config.GitClone = true
|
||||
config.Provides = true
|
||||
config.UpgradeMenu = true
|
||||
|
|
|
@ -166,7 +166,11 @@ func install(parser *arguments) error {
|
|||
fmt.Println()
|
||||
|
||||
if do.HasMake() {
|
||||
if !continueTask("Remove make dependencies after install?", "yY") {
|
||||
if config.RemoveMake == "yes" {
|
||||
removeMake = true
|
||||
} else if config.RemoveMake == "no" {
|
||||
removeMake = false
|
||||
} else if !continueTask("Remove make dependencies after install?", "yY") {
|
||||
removeMake = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue