summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/application.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/puppet/application.rb b/lib/puppet/application.rb
index 0b8e3d9d4..8597bd652 100644
--- a/lib/puppet/application.rb
+++ b/lib/puppet/application.rb
@@ -89,7 +89,7 @@ require 'optparse'
class Puppet::Application
include Puppet::Util
- SBINDIR = File.expand_path(File.dirname(__FILE__)) + '/../../sbin'
+ BINDIRS = File.expand_path(File.dirname(__FILE__)) + '/../../{sbin,bin}'
@@applications = {}
def self.applications; @@applications end
@@ -299,14 +299,17 @@ class Puppet::Application
# RH:FIXME: My goodness, this is ugly.
::RDoc.const_set("PuppetSourceFile", @name)
def (::RDoc).caller
- file = `grep -l 'Puppet::Application\\[:#{::RDoc::PuppetSourceFile}\\]' #{SBINDIR}/*`.chomp
- super << "#{file}:0"
+ docfile = `grep -l 'Puppet::Application\\[:#{::RDoc::PuppetSourceFile}\\]' #{BINDIRS}/*`.chomp
+ super << "#{docfile}:0"
end
::RDoc::usage && exit
else
puts "No help available unless you have RDoc::usage installed"
exit
end
+ rescue Errno::ENOENT
+ puts "No help available for puppet #@name"
+ exit
end
private