provisioner/shell: copy the scripts [GH-29]

This commit is contained in:
Mitchell Hashimoto 2013-06-23 11:56:27 -07:00
parent 702cef84fa
commit 0c59ad8087

View File

@ -102,6 +102,7 @@ func (p *Provisioner) Prepare(raws ...interface{}) error {
func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) { func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) {
scripts := make([]string, len(p.config.Scripts)) scripts := make([]string, len(p.config.Scripts))
copy(scripts, p.config.Scripts)
// If we have an inline script, then turn that into a temporary // If we have an inline script, then turn that into a temporary
// shell script and use that. // shell script and use that.