packer/rpc: when communicator abruptly exits, set exit status 123
This commit is contained in:
parent
6e99c468d4
commit
29ede35b28
|
@ -78,7 +78,8 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
|
||||||
|
|
||||||
conn, err := responseL.Accept()
|
conn, err := responseL.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
cmd.SetExited(123)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
@ -87,7 +88,8 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) {
|
||||||
|
|
||||||
var finished CommandFinished
|
var finished CommandFinished
|
||||||
if err := decoder.Decode(&finished); err != nil {
|
if err := decoder.Decode(&finished); err != nil {
|
||||||
log.Panic(err)
|
cmd.SetExited(123)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd.SetExited(finished.ExitStatus)
|
cmd.SetExited(finished.ExitStatus)
|
||||||
|
|
Loading…
Reference in New Issue