From adb533fd3e31bfabcedda50548efe667d931e102 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 8 May 2013 13:06:57 -0700 Subject: [PATCH] Properly defer a client cleanup in case of a pnic --- command/build/command.go | 1 + packer.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/command/build/command.go b/command/build/command.go index 45d32773e..35bb6331d 100644 --- a/command/build/command.go +++ b/command/build/command.go @@ -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 } diff --git a/packer.go b/packer.go index afd6873de..630b5cf75 100644 --- a/packer.go +++ b/packer.go @@ -11,6 +11,8 @@ import ( ) func main() { + defer plugin.CleanupClients() + commands := map[string]string { "build": "packer-build", }