From f5fe6da89a4257eb75e2961b5dacc5b6fb0a03ca Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Thu, 12 Feb 2026 21:50:23 -0800 Subject: [PATCH] Fix Packer: pass directory (not single file) + -only flag Packer needs the directory to find variables.pkr.hcl. Use -only to select the right source (windows-x64 or windows-arm64). [build images] --- scripts/machine.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/machine.mjs b/scripts/machine.mjs index a9b8f2fa85..3294b832a0 100755 --- a/scripts/machine.mjs +++ b/scripts/machine.mjs @@ -1209,6 +1209,8 @@ async function buildWindowsImageWithPacker({ os, arch, release, command, ci, age const packerArgs = [ packerBin, "build", + "-only", + `azure-arm.${templateName}`, "-var", `client_id=${clientId}`, "-var", @@ -1231,7 +1233,7 @@ async function buildWindowsImageWithPacker({ os, arch, release, command, ci, age `bootstrap_script=${bootstrapPath}`, "-var", `agent_script=${agentPath}`, - templateFile, + templateDir, ]; await spawnSafe(packerArgs, {