fix file copy script to prevent error when encountering empty directory

pull/5234/head
Megan Marsh 9 years ago
parent a924db9a79
commit 199b9062b0

@ -173,7 +173,7 @@ func (c *Communicator) UploadDir(dst string, src string, exclude []string) error
// Make the directory, then copy into it
cmd := &packer.RemoteCmd{
Command: fmt.Sprintf("set -e; mkdir -p %s; cd %s; command cp -R `ls -A .` %s",
Command: fmt.Sprintf("set -e; mkdir -p %s; command cp -R %s/ %s",
containerDst, containerSrc, containerDst),
}
if err := c.Start(cmd); err != nil {

Loading…
Cancel
Save