# File lib/facter/core/execution/posix.rb, line 12 def which(bin) if absolute_path?(bin) return bin if File.executable?(bin) and File.file?(bin) else search_paths.each do |dir| dest = File.join(dir, bin) return dest if File.executable?(dest) and File.file?(dest) end end nil end