mirror of
https://github.com/Jguer/yay
synced 2024-08-31 05:39:29 +00:00
commit
96532c0b27
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
|
||||
|
|
Loading…
Reference in a new issue