packer/plugin: Client.Kill should only kill process if it is running

This commit is contained in:
Mitchell Hashimoto 2013-05-08 14:51:14 -07:00
parent 947209a028
commit c5e83a4b15
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ func (c *client) Start() (address string, err error) {
}
func (c *client) Kill() {
if c.cmd.Process == nil {
return
}
c.cmd.Process.Kill()
// Wait for the client to finish logging so we have a complete log