Commit 35e75ba0 authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

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

parent df72fd0b
...@@ -115,7 +115,8 @@ func ServeBuilder(builder packer.Builder) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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) { ...@@ -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)
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment