fix bug where build vars couldn't be properly interpolated into this execute command (#9275)

This commit is contained in:
Megan Marsh 2020-05-25 02:54:27 -07:00 committed by GitHub
parent 67df9f778a
commit fecb040bf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -371,10 +371,11 @@ func (p *Provisioner) createRemoteCleanUpCommand(remoteFiles []string) (string,
return "", fmt.Errorf("clean up script %q failed to upload: %s", remotePath, err) return "", fmt.Errorf("clean up script %q failed to upload: %s", remotePath, err)
} }
data := map[string]string{ data := p.generatedData
"Path": remotePath, data["Path"] = remotePath
"Vars": p.config.RemoteEnvVarPath, data["Vars"] = p.config.RemoteEnvVarPath
} p.config.ctx.Data = data
p.config.ctx.Data = data p.config.ctx.Data = data
return interpolate.Render(p.config.ExecuteCommand, &p.config.ctx) return interpolate.Render(p.config.ExecuteCommand, &p.config.ctx)
} }