Properly defer a client cleanup in case of a pnic

This commit is contained in:
Mitchell Hashimoto 2013-05-08 13:06:57 -07:00
parent abb51ebb35
commit adb533fd3e
2 changed files with 3 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import "github.com/mitchellh/packer/packer"
type Command byte
func (Command) Run(env packer.Environment, arg []string) int {
env.Ui().Say("YO!")
return 0
}

View File

@ -11,6 +11,8 @@ import (
)
func main() {
defer plugin.CleanupClients()
commands := map[string]string {
"build": "packer-build",
}