packer: closed pipe is caught [GH-875]

pull/919/head
Mitchell Hashimoto 12 years ago
parent 868a64ebbc
commit 1c65536514

@ -20,6 +20,8 @@ BUG FIXES:
* core: Fix crash case if blank parameters are given to Packer. [GH-832]
* core: Fix crash if big file uploads are done. [GH-897]
* core: Fix crash if machine-readable output is going to a closed
pipe. [GH-875]
* builder/docker: user variables work properly. [GH-777]
* builder/qemu: reboots are now possible in provisioners. [GH-864]
* builder/virtualbox,vmware: iso\_checksum is not required if the

@ -11,6 +11,7 @@ import (
"runtime"
"strings"
"sync"
"syscall"
"time"
"unicode"
)
@ -282,6 +283,11 @@ func (u *MachineReadableUi) Machine(category string, args ...string) {
_, err := fmt.Fprintf(u.Writer, "%d,%s,%s,%s\n", now.Unix(), target, category, argsString)
if err != nil {
panic(err)
if err == syscall.EPIPE {
// Ignore epipe errors because that just means that the file
// is probably closed or going to /dev/null or something.
} else {
panic(err)
}
}
}

Loading…
Cancel
Save