packer/plugin: No need for a panic when plugins error

This commit is contained in:
Mitchell Hashimoto 2013-06-25 14:30:08 -05:00
parent df72fd0b0e
commit 35e75ba0d2
1 changed files with 10 additions and 5 deletions

View File

@ -115,7 +115,8 @@ func ServeBuilder(builder packer.Builder) {
swallowInterrupts() swallowInterrupts()
if err := serve(server); err != nil { if err := serve(server); err != nil {
log.Panic(err) log.Printf("ERROR: %s", err)
os.Exit(1)
} }
} }
@ -128,7 +129,8 @@ func ServeCommand(command packer.Command) {
swallowInterrupts() swallowInterrupts()
if err := serve(server); err != nil { if err := serve(server); err != nil {
log.Panic(err) log.Printf("ERROR: %s", err)
os.Exit(1)
} }
} }
@ -141,7 +143,8 @@ func ServeHook(hook packer.Hook) {
swallowInterrupts() swallowInterrupts()
if err := serve(server); err != nil { if err := serve(server); err != nil {
log.Panic(err) log.Printf("ERROR: %s", err)
os.Exit(1)
} }
} }
@ -154,7 +157,8 @@ func ServePostProcessor(p packer.PostProcessor) {
swallowInterrupts() swallowInterrupts()
if err := serve(server); err != nil { if err := serve(server); err != nil {
log.Panic(err) log.Printf("ERROR: %s", err)
os.Exit(1)
} }
} }
@ -167,6 +171,7 @@ func ServeProvisioner(p packer.Provisioner) {
swallowInterrupts() swallowInterrupts()
if err := serve(server); err != nil { if err := serve(server); err != nil {
log.Panic(err) log.Printf("ERROR: %s", err)
os.Exit(1)
} }
} }