provisioner/shell: treat disconnects as retryable.
This commit is contained in:
parent
50b7b92b6c
commit
12176b6afc
|
@ -320,6 +320,10 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
p.config.RemotePath, err)
|
||||
}
|
||||
cmd.Wait()
|
||||
// treat disconnects as retryable by returning an error
|
||||
if cmd.ExitStatus == packer.CmdDisconnect {
|
||||
return fmt.Errorf("Disconnect while removing temporary script.")
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue