# File lib/capistrano/recipes/deploy/local_dependency.rb, line 12 12: def command(command) 13: @message ||= "`#{command}' could not be found in the path on the local host" 14: @success = find_in_path(command) 15: self 16: end
Searches the path, looking for the given utility. If an executable file is found that matches the parameter, this returns true.
# File lib/capistrano/recipes/deploy/local_dependency.rb, line 31 31: def find_in_path(utility) 32: path = (ENV['PATH'] || "").split(File::PATH_SEPARATOR) 33: suffixes = self.class.on_windows? ? self.class.windows_executable_extensions : [""] 34: 35: path.each do |dir| 36: suffixes.each do |sfx| 37: file = File.join(dir, utility + sfx) 38: return true if File.executable?(file) 39: end 40: end 41: 42: false 43: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.