Commit 3eda0f33 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/shell: quote PACKER env vars [GH-1565]

parent fc5db260
......@@ -230,8 +230,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
// Build our variables up by adding in the build name and builder type
envVars := make([]string, len(p.config.Vars)+2)
envVars[0] = "PACKER_BUILD_NAME=" + p.config.PackerBuildName
envVars[1] = "PACKER_BUILDER_TYPE=" + p.config.PackerBuilderType
envVars[0] = fmt.Sprintf("PACKER_BUILD_NAME='%s'", p.config.PackerBuildName)
envVars[1] = fmt.Sprintf("PACKER_BUILDER_TYPE='%s'", p.config.PackerBuilderType)
copy(envVars[2:], p.config.Vars)
for _, path := range scripts {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment