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 }