From 15cbe4769c0bc3105ccdce5f38503f4e06ad471e Mon Sep 17 00:00:00 2001 From: Chris Lundquist Date: Tue, 21 Jan 2020 19:49:49 -0800 Subject: [PATCH] fixes and closes #8547 --- builder/lxd/communicator.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builder/lxd/communicator.go b/builder/lxd/communicator.go index 61a58f84f..db118bcaa 100644 --- a/builder/lxd/communicator.go +++ b/builder/lxd/communicator.go @@ -88,10 +88,12 @@ func (c *Communicator) Upload(dst string, r io.Reader, fi *os.FileInfo) error { } func (c *Communicator) UploadDir(dst string, src string, exclude []string) error { - fileDestination := filepath.Join(c.ContainerName, dst) - - cp, err := c.CmdWrapper(fmt.Sprintf("lxc file push -pr %s %s", src, fileDestination)) + fileDestination := fmt.Sprintf("%s/%s", c.ContainerName, dst) + pushCommand := fmt.Sprintf("lxc file push --debug -pr %s %s", src, fileDestination) + log.Printf(pushCommand) + cp, err := c.CmdWrapper(pushCommand) if err != nil { + log.Printf("Error running cp command: %s", err) return err }