packer: error if UI fails

This commit is contained in:
Mitchell Hashimoto 2013-05-08 17:09:10 -07:00
parent 4b665e39bd
commit 198f984b92
1 changed files with 8 additions and 2 deletions

View File

@ -19,9 +19,15 @@ type ReaderWriterUi struct {
} }
func (rw *ReaderWriterUi) Say(format string, a ...interface{}) { func (rw *ReaderWriterUi) Say(format string, a ...interface{}) {
fmt.Fprintf(rw.Writer, format, a...) _, err := fmt.Fprintf(rw.Writer, format, a...)
if err != nil {
panic(err)
}
} }
func (rw *ReaderWriterUi) Error(format string, a ...interface{}) { func (rw *ReaderWriterUi) Error(format string, a ...interface{}) {
fmt.Fprintf(rw.Writer, format, a...) _, err := fmt.Fprintf(rw.Writer, format, a...)
if err != nil {
panic(err)
}
} }