Ask salt to return a proper exit code so we can fail the builder appropriately.

This commit is contained in:
Erik Simmler 2014-12-30 10:33:59 -05:00
parent 4787f87a4b
commit 034ed36d0e
1 changed files with 1 additions and 1 deletions

View File

@ -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)