docs: fix shell-local execute_command example for -c flag

Fixes #13500. The -c flag takes a single string argument combining Vars and Script.

Made-with: Cursor
This commit is contained in:
themavik 2026-03-19 08:25:09 -04:00
parent e29c0afb8d
commit a4f33e0e77

View file

@ -125,7 +125,7 @@ Optional parameters:
it is necessary below.
- `execute_command` (array of strings) - The command used to execute the
script. By default this is `["/bin/sh", "-c", "{{.Vars}}", "{{.Script}}"]`
script. By default this is `["/bin/sh", "-c", "{{.Vars}} {{.Script}}"]`
on Unix and `["cmd", "/c", "{{.Vars}}", "{{.Script}}"]` on Windows. This is
treated as a [template engine](/packer/docs/templates/legacy_json_templates/engine). There are two
available variables: `Script`, which is the path to the script to run, and