provisioner/chef: show command in output

This commit is contained in:
Mitchell Hashimoto 2015-06-15 14:35:54 -07:00
parent 14787fd4cc
commit 711dfc9d0a
1 changed files with 4 additions and 1 deletions

View File

@ -372,7 +372,10 @@ func (p *Provisioner) knifeExec(ui packer.Ui, comm packer.Communicator, node str
return err
}
if cmd.ExitStatus != 0 {
return fmt.Errorf("Non-zero exit status. See output above for more info.")
return fmt.Errorf(
"Non-zero exit status. See output above for more info.\n\n"+
"Command: %s",
cmdText)
}
return nil