packer: error if UI fails
This commit is contained in:
parent
4b665e39bd
commit
198f984b92
10
packer/ui.go
10
packer/ui.go
|
@ -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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue