From 308b148bb4fad03320c72eb9d4f95bd1cb6068f2 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Thu, 26 Sep 2013 16:39:37 -0700 Subject: [PATCH] get chroot command from proper place. --- builder/amazon/chroot/step_copy_files.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/builder/amazon/chroot/step_copy_files.go b/builder/amazon/chroot/step_copy_files.go index 5e779efa8..4b8298928 100644 --- a/builder/amazon/chroot/step_copy_files.go +++ b/builder/amazon/chroot/step_copy_files.go @@ -21,7 +21,6 @@ type StepCopyFiles struct { func (s *StepCopyFiles) Run(state multistep.StateBag) multistep.StepAction { config := state.Get("config").(*Config) mountPath := state.Get("mount_path").(string) - copyCmd := state.Get("copy_command").(string) ui := state.Get("ui").(packer.Ui) s.files = make([]string, 0, len(config.CopyFiles)) @@ -32,7 +31,7 @@ func (s *StepCopyFiles) Run(state multistep.StateBag) multistep.StepAction { chrootPath := filepath.Join(mountPath, path) log.Printf("Copying '%s' to '%s'", path, chrootPath) - if err := copySingle(chrootPath, path, copyCmd); err != nil { + if err := copySingle(chrootPath, path, config.ChrootCommand); err != nil { err := fmt.Errorf("Error copying file: %s", err) state.Put("error", err) ui.Error(err.Error())