Merge pull request #1800 from tgecho/master

Add `--retcode-passthrough` to salt-call so the build fails when there is an error running `highstate`
This commit is contained in:
Ross Smith II 2014-12-31 07:31:29 -08:00
commit 45758e2925
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)