From 686d4413ecb7fb9c2e1ccc2a6c08061624d2111a Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 15 Jun 2015 15:07:20 -0700 Subject: [PATCH] communicator/winrm: error if download --- communicator/ssh/communicator.go | 3 +-- communicator/winrm/communicator.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index 46dd22e2d..2cc299b30 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -173,12 +173,11 @@ func (c *comm) UploadDir(dst string, src string, excl []string) error { } func (c *comm) Download(path string, output io.Writer) error { - scpFunc := func(w io.Writer, stdoutR *bufio.Reader) error { fmt.Fprint(w, "\x00") // read file info - fi, err := stdoutR.ReadString( '\n') + fi, err := stdoutR.ReadString('\n') if err != nil { return err } diff --git a/communicator/winrm/communicator.go b/communicator/winrm/communicator.go index 82686e2a7..2b53ac62c 100644 --- a/communicator/winrm/communicator.go +++ b/communicator/winrm/communicator.go @@ -113,7 +113,7 @@ func (c *Communicator) UploadDir(dst string, src string, exclude []string) error } func (c *Communicator) Download(src string, dst io.Writer) error { - panic("download not implemented") + return fmt.Errorf("WinRM doesn't support download.") } func (c *Communicator) newCopyClient() (*winrmcp.Winrmcp, error) {