diff options
-rw-r--r-- | knife/lib/chef/knife/core/object_loader.rb | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/knife/lib/chef/knife/core/object_loader.rb b/knife/lib/chef/knife/core/object_loader.rb index 5dec55bebf..abfcb7b0cc 100644 --- a/knife/lib/chef/knife/core/object_loader.rb +++ b/knife/lib/chef/knife/core/object_loader.rb @@ -40,7 +40,6 @@ class Chef def load_from(repo_location, *components) unless object_file = find_file(repo_location, *components) - puts "Could not find or open file from #{components} '#{components.last}' in current directory or in '#{repo_location}/#{components.join("/")}'" ui.error "Could not find or open file '#{components.last}' in current directory or in '#{repo_location}/#{components.join("/")}'" exit 1 end @@ -49,19 +48,13 @@ class Chef # When someone makes this awesome, please update the above error message. def find_file(repo_location, *components) - puts "AAAA #{Dir.pwd} + #{File.expand_path(components.last)}" if file_exists_and_is_readable?(File.expand_path( components.last )) - puts "AAAA <" File.expand_path( components.last ) else - puts "AAAB #{Dir.pwd} + #{File.expand_path(components.last)}" relative_path = File.join(Dir.pwd, repo_location, *components) - puts "AAAB #{Dir.pwd} + #{relative_path}" if file_exists_and_is_readable?(relative_path) - puts "AAAC #{relative_path}" relative_path else - puts "AAAD nil" nil end end @@ -113,8 +106,6 @@ class Chef end def file_exists_and_is_readable?(file) - puts "AABA: #{file} #{File.exist?(file)} #{File.readable?(file)}" - puts "AABB: #{Dir["/workdir/knife/spec/**/*"]}" File.exist?(file) && File.readable?(file) end |