Commit e8cbb9f9 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

provisioner/shell: Error message if provisioning fails

parent 1e61cc2b
......@@ -193,6 +193,11 @@ func (p *Provisioner) Provision(ui packer.Ui, comm packer.Communicator) {
ui.Message(strings.TrimSpace(output))
case exitStatus := <-exitChan:
log.Printf("shell provisioner exited with status %d", exitStatus)
if exitStatus != 0 {
ui.Error(fmt.Sprintf("Script excited with non-zero exit status: %d", exitStatus))
}
break OutputLoop
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment