puppetlabs/puppet — pull request #1264 by zaphod42 (2012-11-07 00:50:06+00:00)
Title: (#17458) Load 'puppet' at the right time

Previously the Puppet::Util.which method tried to compensate for the
puppet.rb file not being loaded at the right time by trying to load it
itself. When a performance improvement was added (commit 20efe94) to check if
this needed to be done it broke the codepath for executing external puppet-*
commands.

This commit fixes this by requiring 'puppet' at the right place in the entry
point (Puppet::Util::CommandLine) and removing the workaround in
Puppet::Util.which.

Paired-with: Josh Cooper