Commit adb533fd authored by Mitchell Hashimoto's avatar Mitchell Hashimoto

Properly defer a client cleanup in case of a pnic

parent abb51ebb
...@@ -5,6 +5,7 @@ import "github.com/mitchellh/packer/packer" ...@@ -5,6 +5,7 @@ import "github.com/mitchellh/packer/packer"
type Command byte type Command byte
func (Command) Run(env packer.Environment, arg []string) int { func (Command) Run(env packer.Environment, arg []string) int {
env.Ui().Say("YO!")
return 0 return 0
} }
......
...@@ -11,6 +11,8 @@ import ( ...@@ -11,6 +11,8 @@ import (
) )
func main() { func main() {
defer plugin.CleanupClients()
commands := map[string]string { commands := map[string]string {
"build": "packer-build", "build": "packer-build",
} }
......
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