Ask salt to return a proper exit code so we can fail the builder appropriately.
This commit is contained in:
parent
4787f87a4b
commit
034ed36d0e
|
@ -181,7 +181,7 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) error {
|
|||
}
|
||||
|
||||
ui.Message("Running highstate")
|
||||
cmd := &packer.RemoteCmd{Command: "sudo salt-call --local state.highstate -l info"}
|
||||
cmd := &packer.RemoteCmd{Command: "sudo salt-call --local state.highstate -l info --retcode-passthrough"}
|
||||
if err = cmd.StartWithUi(comm, ui); err != nil || cmd.ExitStatus != 0 {
|
||||
if err == nil {
|
||||
err = fmt.Errorf("Bad exit status: %d", cmd.ExitStatus)
|
||||
|
|
Loading…
Reference in New Issue