HomePhorge

(#9458) Require main puppet module
dce82eaa9002Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#9458) Require main puppet module

Puppet was getting an undefined method error when running puppet
without a subcommand or with an "unavailable" subcommand. This was due
to the Puppet::Util.which method attempting to access the
Puppet.features.microsoft_windows? feature before the main Puppet
module had been loaded.

The command_line code is very order-dependent when launching available
applications: it has to instantiate the application and set the
run-mode prior to loading the top-level Puppet module. However, the
command_line only invokes the Puppet::Util.which method when
attempting to resolve an external application or when displaying usage
information. In other words, we've already decided that we're not
going to launch an available application and we're either going to
invoke system(..) or we're going to exit, in which case, it's safe to
load the top-level Puppet module without side-effects.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU41302e9003f5: Fixes #9143, allows macauthorization provider to work on OS X Lion 10.7
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUdce82eaa9002: (#9458) Require main puppet module (authored by Josh Cooper <josh@puppetlabs.com>).Sep 29 2011, 11:59 PM