HomePhorge

(#17458) Load 'puppet' at the right time
b5ed15baadffUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#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 <josh@puppetlabs.com>