mirror of
https://github.com/hashicorp/packer.git
synced 2026-10-06 22:50:24 -04:00
Merge pull request #544 from mitchellh/fix#500
builder/amazon/chroot: use --remove-destination for cp
This commit is contained in:
@@ -33,7 +33,7 @@ func (s *StepCopyFiles) Run(state multistep.StateBag) multistep.StepAction {
|
||||
chrootPath := filepath.Join(mountPath, path)
|
||||
log.Printf("Copying '%s' to '%s'", path, chrootPath)
|
||||
|
||||
cmdText, err := wrappedCommand(fmt.Sprintf("cp %s %s", path, chrootPath))
|
||||
cmdText, err := wrappedCommand(fmt.Sprintf("cp --remove-destination %s %s", path, chrootPath))
|
||||
if err != nil {
|
||||
err := fmt.Errorf("Error building copy command: %s", err)
|
||||
state.Put("error", err)
|
||||
|
||||
Reference in New Issue
Block a user