summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application.rb9
-rw-r--r--lib/puppet/application/inspect.rb10
2 files changed, 13 insertions, 6 deletions
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 374dc850b..1e00bcce7 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -215,11 +215,10 @@ class Application
def find(name)
klass = name.to_s.capitalize
- # const_defined? is used before const_get since const_defined? will only
- # check within our namespace, whereas const_get will check ancestor
- # trees as well, resulting in unexpected behaviour.
- if !self.const_defined?(klass)
- puts "Unable to find application '#{name.to_s}'."
+ begin
+ require File.join('puppet', 'application', name.to_s)
+ rescue LoadError => e
+ puts "Unable to find application '#{name}'. #{e}"
Kernel::exit(1)
end
diff --git a/lib/puppet/application/inspect.rb b/lib/puppet/application/inspect.rb
index b5a4ac872..6737128aa 100644
--- a/lib/puppet/application/inspect.rb
+++ b/lib/puppet/application/inspect.rb
@@ -31,7 +31,7 @@ Prepares and submits an inspection report to the puppet master.
USAGE
-----
-puppet inspect
+puppet inspect [--archive_files] [--archive_file_server]
DESCRIPTION
@@ -57,6 +57,14 @@ configuration file documentation at
http://docs.puppetlabs.com/references/latest/configuration.html for
the full list of acceptable settings.
+* --archive_files:
+ During an inspect run, whether to archive files whose contents are audited to
+ a file bucket.
+
+* --archive_file_server:
+ During an inspect run, the file bucket server to archive files to if
+ archive_files is set. The default value is '$server'.
+
AUTHOR
------