diff options
| author | Matt Robinson <matt@puppetlabs.com> | 2011-07-19 14:19:26 -0700 |
|---|---|---|
| committer | Matt Robinson <matt@puppetlabs.com> | 2011-07-25 12:56:57 -0700 |
| commit | 89c021cac52a4bdecbe490772cb73cef9ef049c5 (patch) | |
| tree | b75b6589df4e48a507f0066fd8ab14ce99d39039 /lib/puppet | |
| parent | 3165364e20fc008b3997effafb290fe47c13bf42 (diff) | |
| download | puppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.tar.gz puppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.tar.xz puppet-89c021cac52a4bdecbe490772cb73cef9ef049c5.zip | |
(#8418) Fix inspect app to have the correct run_mode
Requiring puppet before the run_mode has been set by the application
causes the default run_mode of 'user' to be set instead of what the
application wants. This leads to the incorrect default settings to be
used, which lead to inspect not being able to properly retrieve file
metadata from a fileserver.
Reviewed-by: Max Martin <max@puppetlabs.com>
Diffstat (limited to 'lib/puppet')
| -rw-r--r-- | lib/puppet/application/inspect.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/puppet/application/inspect.rb b/lib/puppet/application/inspect.rb index ce32c661c..2260feed7 100644 --- a/lib/puppet/application/inspect.rb +++ b/lib/puppet/application/inspect.rb @@ -1,6 +1,4 @@ -require 'puppet' require 'puppet/application' -require 'puppet/file_bucket/dipper' class Puppet::Application::Inspect < Puppet::Application @@ -97,6 +95,11 @@ Licensed under the GNU General Public License version 2 Puppet::Resource::Catalog.terminus_class = :yaml end + def preinit + require 'puppet' + require 'puppet/file_bucket/dipper' + end + def run_command benchmark(:notice, "Finished inspection") do retrieval_starttime = Time.now |
