fix docs for execute_command and elevated_execute_command

This commit is contained in:
Megan Marsh 2017-09-14 10:48:56 -07:00
parent d458628529
commit f86d45eaf6
1 changed files with 8 additions and 1 deletions

View File

@ -55,13 +55,20 @@ Optional parameters:
and Packer should therefore not convert Windows line endings to Unix line and Packer should therefore not convert Windows line endings to Unix line
endings (if there are any). By default this is false. endings (if there are any). By default this is false.
- `elevated_execute_command` (string) - The command to use to execute the elevated
script. By default this is `powershell if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode`.
The value of this is treated as [configuration
template](/docs/templates/engine.html). There are two
available variables: `Path`, which is the path to the script to run, and
`Vars`, which is the list of `environment_vars`, if configured.
- `environment_vars` (array of strings) - An array of key/value pairs to - `environment_vars` (array of strings) - An array of key/value pairs to
inject prior to the execute\_command. The format should be `key=value`. inject prior to the execute\_command. The format should be `key=value`.
Packer injects some environmental variables by default into the environment, Packer injects some environmental variables by default into the environment,
as well, which are covered in the section below. as well, which are covered in the section below.
- `execute_command` (string) - The command to use to execute the script. By - `execute_command` (string) - The command to use to execute the script. By
default this is `powershell "& { {{.Vars}}{{.Path}}; exit $LastExitCode}"`. default this is `powershell if (Test-Path variable:global:ProgressPreference){$ProgressPreference='SilentlyContinue'};{{.Vars}}&'{{.Path}}';exit $LastExitCode`.
The value of this is treated as [configuration The value of this is treated as [configuration
template](/docs/templates/engine.html). There are two template](/docs/templates/engine.html). There are two
available variables: `Path`, which is the path to the script to run, and available variables: `Path`, which is the path to the script to run, and