adrienthebo/vagrant-pe_build — pull request #8 by trlinkin (2013-06-24 07:26:10+00:00)
Title: Use @env hash in `PEBuild::Action::Download`

Without this commit, the attempt to output using the Vagrant "ui" facility
fails in `PEBuild::Idempotent#idempotent`.

The class `PEBuild::Action::Download` receives a hash that represents a
merge between the current provisioner being invoked and the global
configuration applied to the VM. The value accessed by the `:ui` key in the
hash is then passed to an instance of the `PEBuild::Archive`. The
`PEBuild::Archive` class includes the `PEBuild::Idempotent` module. The
method `PEBuild::Idempotent#idempotent` is incorrectly treating the
`Vagrant::UI::Interface` object as an instance of `Vagrant::Environment`,
causing an error.

This commit corrects this issue by passing the environment hash all the way
through to the `PEBuild::Archive` class. The method in
`PEBuild::Idempotent` has also been changed to access the `:ui` key from
the hash.