diff options
-rw-r--r-- | lib/chef/mixin/command.rb | 18 | ||||
-rw-r--r-- | lib/chef/resource/script.rb | 2 |
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 |