mitchellh/packer — pull request #447 by jasonberanek (2013-09-21 04:52:39+00:00)
Title: post-processor/vagrant: fix output errors when sub processor settings undefined [GH-446]

Added a check to avoid passing a `nil` configuration element to the sub post-processor. It appears the behavior, whether intended or not, of a mapstructure Decoder is to clear previously processed configuration settings when receiving a `nil` to decode.

When no sub post-processor settings are made for the Vagrant post-processor, the sub post processors aren't configured until execution time, and provide `nil` as the value for the map of sub post-processor specific settings. This results in `output` configuration value not getting passed to the sub post-processor and the post-processing failing.

Admit this is a work around for the upstream issue/behavior, either making the behavior of a `nil` input explicit in the `common.DecodeConfig` function or within the `mapstructure` library directly would be useful. Since those changes may create API impacts to other clients, I'm limiting this pull request to just addressing the original issue.