Browse Source

fix: can combine chain of 2 appends into one

update-packer-186
Bo-Yi Wu 6 years ago
parent
commit
07b497d416
  1. 6
      plugin.go

6
plugin.go

@ -43,8 +43,7 @@ func pkValidate(config Config) *exec.Cmd {
}
for k, v := range config.Vars {
args = append(args, "-var")
args = append(args, fmt.Sprintf("%s=%s", k, v))
args = append(args, "-var", fmt.Sprintf("%s=%s", k, v))
}
if len(config.Except) > 0 {
@ -76,8 +75,7 @@ func pkBuild(config Config) *exec.Cmd {
}
for k, v := range config.Vars {
args = append(args, "-var")
args = append(args, fmt.Sprintf("%s=%s", k, v))
args = append(args, "-var", fmt.Sprintf("%s=%s", k, v))
}
if len(config.Except) > 0 {

Loading…
Cancel
Save