From 34db6c4ab11cb34b6170a39196e8ac7cf8fc7557 Mon Sep 17 00:00:00 2001 From: DanHam Date: Fri, 23 Mar 2018 12:45:49 +0000 Subject: [PATCH 1/3] Remove temp debugging output --- provisioner/powershell/provisioner.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index 6b7adfac6..f48693e4d 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -111,7 +111,6 @@ type EnvVarsTemplate struct { func (p *Provisioner) Prepare(raws ...interface{}) error { //Create passthrough for winrm password so we can fill it in once we know it - log.Printf("MEGAN context is %#v", p.config.ctx) p.config.ctx.Data = &EnvVarsTemplate{ WinRMPassword: `{{.WinRMPassword}}`, } @@ -248,7 +247,6 @@ func extractScript(p *Provisioner) (string, error) { } func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error { - log.Printf("MEGAN context is %#v", p.config.ctx) ui.Say(fmt.Sprintf("Provisioning with Powershell...")) p.communicator = comm From 191f407f5cdd0ed8f8725c899951dbde713e91a3 Mon Sep 17 00:00:00 2001 From: DanHam Date: Fri, 23 Mar 2018 12:54:33 +0000 Subject: [PATCH 2/3] Fix copy/paste error in comment --- communicator/ssh/connect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/communicator/ssh/connect.go b/communicator/ssh/connect.go index 7622a90e3..80bf0a9f4 100644 --- a/communicator/ssh/connect.go +++ b/communicator/ssh/connect.go @@ -28,7 +28,7 @@ func ConnectFunc(network, addr string) func() (net.Conn, error) { } } -// ConnectFunc is a convenience method for returning a function +// ProxyConnectFunc is a convenience method for returning a function // that connects to a host using SOCKS5 proxy func ProxyConnectFunc(socksProxy string, socksAuth *proxy.Auth, network, addr string) func() (net.Conn, error) { return func() (net.Conn, error) { From ef4817d644c240a7c85a71d7d87bdf719527adef Mon Sep 17 00:00:00 2001 From: DanHam Date: Fri, 23 Mar 2018 14:01:15 +0000 Subject: [PATCH 3/3] Fix vertical spacing --- provisioner/powershell/provisioner.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/provisioner/powershell/provisioner.go b/provisioner/powershell/provisioner.go index f48693e4d..e28becef0 100644 --- a/provisioner/powershell/provisioner.go +++ b/provisioner/powershell/provisioner.go @@ -460,8 +460,8 @@ func (p *Provisioner) createCommandTextNonPrivileged() (command string, err erro func getWinRMPassword() string { winRMPass, _ := commonhelper.RetrieveSharedState("winrm_password") return winRMPass - } + func (p *Provisioner) createCommandTextPrivileged() (command string, err error) { // Prepare everything needed to enable the required env vars within the remote environment envVarPath, err := p.prepareEnvVars(true)