diff --git a/packer.go b/packer.go index afd6873de..34cddfd39 100644 --- a/packer.go +++ b/packer.go @@ -11,6 +11,8 @@ import ( ) func main() { + log.SetFlags(log.Ldate | log.Ltime | log.Llongfile) + commands := map[string]string { "build": "packer-build", } diff --git a/packer/plugin/client.go b/packer/plugin/client.go index bb20ba077..2bde714c2 100644 --- a/packer/plugin/client.go +++ b/packer/plugin/client.go @@ -38,6 +38,7 @@ func CleanupClients() { }() } + log.Println("waiting for all plugin processes to complete...") wg.Wait() } @@ -91,6 +92,7 @@ func (c *client) Start() (address string, err error) { // Start goroutine to wait for process to exit go func() { c.cmd.Wait() + log.Println("plugin process exited") c.exited = true }() @@ -159,7 +161,7 @@ func (c *client) logStderr(r io.Reader) { } var err error - for err == nil { + for err != io.EOF { var line string line, err = buf.ReadString('\n') if line != "" { diff --git a/packer/plugin/plugin.go b/packer/plugin/plugin.go index 43a44d1a7..9d16271c3 100644 --- a/packer/plugin/plugin.go +++ b/packer/plugin/plugin.go @@ -77,6 +77,4 @@ func ServeCommand(command packer.Command) { if err := serve(server); err != nil { log.Panic(err) } - - log.Println("Command successfully served. Exiting.") }