gosddc/packer-post-processor-vagrant-vmware-ovf — pull request #2 by StefanScherer (2014-06-15 10:33:55+00:00)
Title: Check exit code and log output of ovftool

Hi @frapposelli

I have added a function `RunAndLog` that I have found in packer/builder/vmware/common/driver.go that is very useful. Is there a way to use this function from there, but in the core driver.go file it as a lower case letter `runAndLog`. This could be used for any external program call to have better debug logging (with PACKER_LOG=1).

I also check the exit code of the ovftool call, so the post-processor now aborts the packer build with an error.
I often forget to put ovftool into PATH and I found out that the current post-processor then only creates a nearly empty vagrant box file with only the Vagrantfile and the metadata.json in it.

Example output of packer without ovftool in PATH:

```
Build 'vmware-iso' errored: 1 error(s) occurred:

* Post-processor failed: Failed: exec: "ovftool": executable file not found in $PATH
Stdout:
```