fix winrmpass sanitization to account for empty string value.
This commit is contained in:
parent
0649c3f7dc
commit
4b9568e409
|
@ -495,7 +495,7 @@ func (p *Provisioner) executeAnsible(ui packer.Ui, comm packer.Communicator, pri
|
||||||
flattenedCmd := strings.Join(cmd.Args, " ")
|
flattenedCmd := strings.Join(cmd.Args, " ")
|
||||||
sanitized := flattenedCmd
|
sanitized := flattenedCmd
|
||||||
winRMPass, ok := p.generatedData["WinRMPassword"]
|
winRMPass, ok := p.generatedData["WinRMPassword"]
|
||||||
if ok {
|
if ok && winRMPass != "" {
|
||||||
sanitized = strings.Replace(sanitized,
|
sanitized = strings.Replace(sanitized,
|
||||||
winRMPass.(string), "*****", -1)
|
winRMPass.(string), "*****", -1)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue