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

This commit is contained in:
Mitchell Hashimoto 2014-10-28 08:23:18 -07:00
parent fc5db2604e
commit 3eda0f33a0
1 changed files with 2 additions and 2 deletions

View File

@ -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 {