From 199b9062b07204bb46c815057996c80ca9ea0db5 Mon Sep 17 00:00:00 2001 From: Megan Marsh Date: Wed, 9 Aug 2017 15:19:17 -0700 Subject: [PATCH] fix file copy script to prevent error when encountering empty directory --- builder/docker/communicator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/docker/communicator.go b/builder/docker/communicator.go index d33f79e95..43e4c01f2 100644 --- a/builder/docker/communicator.go +++ b/builder/docker/communicator.go @@ -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 {