puppetlabs/puppet — pull request #606 by zaphod42 (2012-03-27 22:42:00+00:00)
Title: Bug #13284 - missing env vars during provider command execution

This provides a new way of defining commands that provides more control over how the command will end up getting executed.

Example:

has_command(:port, "/opt/local/bin/port") do
environment :HOME => "/opt/local"
end

By default the command is required, but can be marked as optional using `is_optional`. Both `commands` and `optional_commands` are now implemented using `has_command` to remove duplication.