From a31507d575c15e38bbc72ca042921a8a1ccd4be3 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 7 May 2024 15:56:19 -0400 Subject: [PATCH] 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. --- test/commands_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/commands_test.go b/test/commands_test.go index 56d2d3345..3251ee3ad 100644 --- a/test/commands_test.go +++ b/test/commands_test.go @@ -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)) }