Merge pull request #5523 from Ohadbasan/master
Add suggestion for "expected_disconnect" option if disconnection occurs
This commit is contained in:
commit
0d19fbc27d
|
@ -283,7 +283,8 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
// we were expecting it.
|
||||
if cmd.ExitStatus == packer.CmdDisconnect {
|
||||
if !p.config.ExpectDisconnect {
|
||||
return fmt.Errorf("Script disconnected unexpectedly.")
|
||||
return fmt.Errorf("Script disconnected unexpectedly. " +
|
||||
"Try adding \"expect_disconnect\": true in the shell provisioner parameters.")
|
||||
}
|
||||
} else if cmd.ExitStatus != 0 {
|
||||
return fmt.Errorf("Script exited with non-zero exit status: %d", cmd.ExitStatus)
|
||||
|
|
Loading…
Reference in New Issue