Commit 8b00c828 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

packer/rpc: when communicator abruptly exits, set exit status 123

parent 717746ce
...@@ -78,7 +78,8 @@ func (c *communicator) Start(cmd *packer.RemoteCmd) (err error) { ...@@ -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) { ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment