summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatt Robinson <matt@puppetlabs.com>2011-08-09 11:46:00 -0700
committerMatt Robinson <matt@puppetlabs.com>2011-08-09 11:46:00 -0700
commit2db9725bf6774de2e1fe9d42f4b1de948524acd3 (patch)
tree00099b9f2c8467760c71b47f25196eeff18e4a83 /lib
parent3a17e2896b4167aa33f3bbe7a2b7aa6ed3086ae4 (diff)
parent310bd552e320a0fd0561b3d1619820428a07a01d (diff)
downloadpuppet-2db9725bf6774de2e1fe9d42f4b1de948524acd3.tar.gz
puppet-2db9725bf6774de2e1fe9d42f4b1de948524acd3.tar.xz
puppet-2db9725bf6774de2e1fe9d42f4b1de948524acd3.zip
Merge branch 'ticket/2.7.x/maint-fix_inspect_help' into 2.7.x
* ticket/2.7.x/maint-fix_inspect_help: maint: Add inspect app options to help maint: Fix inspect help
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
------