Skip to content

Commit

Permalink
Merge pull request Jguer#562 from Morganamilo/Jguer#560
Browse files Browse the repository at this point in the history
Add --makepkgconf
  • Loading branch information
Morganamilo authored Jul 24, 2018
2 parents f567abe + 4af671a commit 96532c0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 2 additions & 0 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 96532c0

Please sign in to comment.