mirror of
https://github.com/Jguer/yay
synced 2024-10-31 04:12:51 +00:00
commit
96532c0b27
4 changed files with 12 additions and 0 deletions
4
cmd.go
4
cmd.go
|
@ -273,6 +273,10 @@ func handleConfig(option, value string) bool {
|
|||
config.EditorFlags = value
|
||||
case "makepkg":
|
||||
config.MakepkgBin = value
|
||||
case "makepkgconf":
|
||||
config.MakepkgConf = value
|
||||
case "nomakepkgconf":
|
||||
config.MakepkgConf = ""
|
||||
case "pacman":
|
||||
config.PacmanBin = value
|
||||
case "tar":
|
||||
|
|
|
@ -39,6 +39,7 @@ type Configuration struct {
|
|||
Editor string `json:"editor"`
|
||||
EditorFlags string `json:"editorflags"`
|
||||
MakepkgBin string `json:"makepkgbin"`
|
||||
MakepkgConf string `json:"makepkgconf"`
|
||||
PacmanBin string `json:"pacmanbin"`
|
||||
PacmanConf string `json:"pacmanconf"`
|
||||
TarBin string `json:"tarbin"`
|
||||
|
@ -153,6 +154,7 @@ func defaultSettings(config *Configuration) {
|
|||
config.EditorFlags = ""
|
||||
config.Devel = false
|
||||
config.MakepkgBin = "makepkg"
|
||||
config.MakepkgConf = ""
|
||||
config.NoConfirm = false
|
||||
config.PacmanBin = "pacman"
|
||||
config.PGPFetch = true
|
||||
|
|
4
exec.go
4
exec.go
|
@ -103,6 +103,10 @@ func passToMakepkg(dir string, args ...string) *exec.Cmd {
|
|||
mflags := strings.Fields(config.MFlags)
|
||||
args = append(args, mflags...)
|
||||
|
||||
if config.MakepkgConf != "" {
|
||||
args = append(args, "--config", config.MakepkgConf)
|
||||
}
|
||||
|
||||
cmd := exec.Command(config.MakepkgBin, args...)
|
||||
cmd.Dir = dir
|
||||
return cmd
|
||||
|
|
|
@ -452,6 +452,8 @@ func hasParam(arg string) bool {
|
|||
return true
|
||||
case "makepkg":
|
||||
return true
|
||||
case "makepkgconf":
|
||||
return true
|
||||
case "pacman":
|
||||
return true
|
||||
case "tar":
|
||||
|
|
Loading…
Reference in a new issue