commhostport isn't present if communicator is null; protect casting in a check
This commit is contained in:
parent
ee4b3e796e
commit
f1f834b8fe
|
@ -282,7 +282,10 @@ func (s *stepRun) applyUserOverrides(defaultArgs map[string]interface{}, config
|
||||||
if len(config.QemuArgs) > 0 {
|
if len(config.QemuArgs) > 0 {
|
||||||
s.ui.Say("Overriding default Qemu arguments with qemuargs template option...")
|
s.ui.Say("Overriding default Qemu arguments with qemuargs template option...")
|
||||||
|
|
||||||
commHostPort := state.Get("commHostPort").(int)
|
commHostPort := 0
|
||||||
|
if config.CommConfig.Comm.Type != "none" {
|
||||||
|
commHostPort = state.Get("commHostPort").(int)
|
||||||
|
}
|
||||||
httpIp := state.Get("http_ip").(string)
|
httpIp := state.Get("http_ip").(string)
|
||||||
httpPort := state.Get("http_port").(int)
|
httpPort := state.Get("http_port").(int)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue