From e418727a09dc47aee05e15fa84a8d583a8de2ec0 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 30 Jul 2013 16:45:49 -0700 Subject: [PATCH] builder/amazon/chroot: initial len should be 0 so we don't have empty --- builder/amazon/chroot/step_copy_files.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/amazon/chroot/step_copy_files.go b/builder/amazon/chroot/step_copy_files.go index 432a3b28e..eab0ee6e8 100644 --- a/builder/amazon/chroot/step_copy_files.go +++ b/builder/amazon/chroot/step_copy_files.go @@ -24,7 +24,7 @@ func (s *StepCopyFiles) Run(state map[string]interface{}) multistep.StepAction { mountPath := state["mount_path"].(string) ui := state["ui"].(packer.Ui) - s.files = make([]string, len(config.CopyFiles)) + s.files = make([]string, 0, len(config.CopyFiles)) if len(config.CopyFiles) > 0 { ui.Say("Copying files from host to chroot...") for _, path := range config.CopyFiles {