Merge pull request #4197 from mitchellh/retryondc
provisioner/shell: treat disconnects as retryable.
This commit is contained in:
commit
f354882282
|
@ -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