test: fix packerCommand to use the right binary

When the Run command was introduced, despite the path to the temporary
packer binary being stored in the command, we were invoking Packer
through "packer", which would resolve whatever is in our PATH that
resolves first.

This was not the intention, so we fix this problem with this commit.
pull/13032/head
Lucas Bajolet 2 years ago committed by Lucas Bajolet
parent 4717955e2e
commit a31507d575

@ -76,7 +76,7 @@ func (pc *packerCommand) Run() (string, string, error) {
}
func (pc *packerCommand) doRun() {
cmd := exec.Command("packer", pc.args...)
cmd := exec.Command(pc.packerPath, pc.args...)
for key, val := range pc.env {
cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", key, val))
}

Loading…
Cancel
Save