summaryrefslogtreecommitdiff
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
parent7aebbf9e59e61f6afa8ec299938230c93288bffb (diff)
downloadchef-5ed024d61f974c046fcd3b2549225748fc745914.tar.gz
yagn - removing whereis
-rw-r--r--lib/chef/mixin/command.rb18
-rw-r--r--lib/chef/resource/script.rb2
2 files changed, 2 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])
diff --git a/lib/chef/resource/script.rb b/lib/chef/resource/script.rb
index a99088d09b..d59882ab9c 100644
--- a/lib/chef/resource/script.rb
+++ b/lib/chef/resource/script.rb
@@ -16,6 +16,8 @@
# limitations under the License.
#
+require File.join(File.dirname(__FILE__), "execute")
+
class Chef
class Resource
class Script < Chef::Resource::Execute