summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/command.rb
diff options
context:
space:
mode:
authorAdam Jacob <adam@hjksolutions.com>2008-09-08 13:39:43 -0700
committerAdam Jacob <adam@hjksolutions.com>2008-09-08 13:39:43 -0700
commit5ed024d61f974c046fcd3b2549225748fc745914 (patch)
tree975c43e36ff63c647dea55717a0cf93a505c8d47 /lib/chef/mixin/command.rb
parent7aebbf9e59e61f6afa8ec299938230c93288bffb (diff)
downloadchef-5ed024d61f974c046fcd3b2549225748fc745914.tar.gz
yagn - removing whereis
Diffstat (limited to 'lib/chef/mixin/command.rb')
-rw-r--r--lib/chef/mixin/command.rb18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/chef/mixin/command.rb b/lib/chef/mixin/command.rb
index e2b61cadde..f3deb48a77 100644
--- a/lib/chef/mixin/command.rb
+++ b/lib/chef/mixin/command.rb
@@ -25,24 +25,6 @@ class Chef
module Mixin
module Command
- def whereis(command, path=nil)
- raise ArgumentError "Path must be an array!" unless path.kind_of?(Array)
-
- search_path = Chef::Config[:executable_path]
- if path
- search_path.unshift(*path)
- end
-
- search_path.each do |sp|
- potential_file = File.join(sp, command)
- if File.exists?(potential_file) && File.executable?(potential_file)
- return potential_file
- end
- end
-
- raise Chef::Exception::FileNotFound, "Cannot find #{command} in #{search_path.join(File::PATH_SEPARATOR)}"
- end
-
def run_command(args={})
if args.has_key?(:creates)
if File.exists?(args[:creates])