provisioner/shell: quote PACKER env vars [GH-1565]
This commit is contained in:
parent
fc5db2604e
commit
3eda0f33a0
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue