Merge pull request #6050 from DanHam/minor-fixes

Minor fixes
This commit is contained in:
Megan Marsh 2018-03-23 15:56:40 -07:00 committed by GitHub
commit d1ce1f8114
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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 // that connects to a host using SOCKS5 proxy
func ProxyConnectFunc(socksProxy string, socksAuth *proxy.Auth, network, addr string) func() (net.Conn, error) { func ProxyConnectFunc(socksProxy string, socksAuth *proxy.Auth, network, addr string) func() (net.Conn, error) {
return func() (net.Conn, error) { return func() (net.Conn, error) {

View File

@ -111,7 +111,6 @@ type EnvVarsTemplate struct {
func (p *Provisioner) Prepare(raws ...interface{}) error { func (p *Provisioner) Prepare(raws ...interface{}) error {
//Create passthrough for winrm password so we can fill it in once we know it //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{ p.config.ctx.Data = &EnvVarsTemplate{
WinRMPassword: `{{.WinRMPassword}}`, WinRMPassword: `{{.WinRMPassword}}`,
} }
@ -248,7 +247,6 @@ func extractScript(p *Provisioner) (string, error) {
} }
func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) 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...")) ui.Say(fmt.Sprintf("Provisioning with Powershell..."))
p.communicator = comm p.communicator = comm
@ -462,8 +460,8 @@ func (p *Provisioner) createCommandTextNonPrivileged() (command string, err erro
func getWinRMPassword() string { func getWinRMPassword() string {
winRMPass, _ := commonhelper.RetrieveSharedState("winrm_password") winRMPass, _ := commonhelper.RetrieveSharedState("winrm_password")
return winRMPass return winRMPass
} }
func (p *Provisioner) createCommandTextPrivileged() (command string, err error) { func (p *Provisioner) createCommandTextPrivileged() (command string, err error) {
// Prepare everything needed to enable the required env vars within the remote environment // Prepare everything needed to enable the required env vars within the remote environment
envVarPath, err := p.prepareEnvVars(true) envVarPath, err := p.prepareEnvVars(true)