diff --git a/cmd.go b/cmd.go index 7b872661..a1204aa0 100644 --- a/cmd.go +++ b/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": diff --git a/config.go b/config.go index 06eee594..06be4bdb 100644 --- a/config.go +++ b/config.go @@ -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 diff --git a/exec.go b/exec.go index 76040641..dd5b1e88 100644 --- a/exec.go +++ b/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 diff --git a/parser.go b/parser.go index 276726bb..cd91c68f 100644 --- a/parser.go +++ b/parser.go @@ -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":