puppetlabs/puppet — pull request #1378 by mruzicka (2013-01-08 17:54:35+00:00)
Title: (#14872) PMT respect environment's module path

This patch fixes the Puppet::ModuleTool#set_option_defaults method such that
it respects the specified environment (if any) when determining the default
value for the --target-dir (the modules install directory) option.
The patch overhauls the entire method in the process to make it more readable,
and it also updates relevant unit tests and adds a pair of new acceptance
tests.