diff options
author | jkeiser <jkeiser@opscode.com> | 2013-01-16 07:10:11 -0800 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-06-07 13:12:20 -0700 |
commit | 30eedb5bba2cf9a3774e8d28708ebfd92a544a59 (patch) | |
tree | e2e674a207d986c5d14514054fceac14420741ff /lib/chef/knife/list.rb | |
parent | 3d9dc86eb32d3acde262309e3108208a500b2b9f (diff) | |
download | chef-30eedb5bba2cf9a3774e8d28708ebfd92a544a59.tar.gz |
Make format_path take an entry, not a path
Diffstat (limited to 'lib/chef/knife/list.rb')
-rw-r--r-- | lib/chef/knife/list.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/knife/list.rb b/lib/chef/knife/list.rb index e9a60ddaf6..e78251b469 100644 --- a/lib/chef/knife/list.rb +++ b/lib/chef/knife/list.rb @@ -49,7 +49,7 @@ class Chef elsif result.exists? results << result elsif pattern.exact_path - ui.error "#{format_path(result.path)}: No such file or directory" + ui.error "#{format_path(result)}: No such file or directory" self.exit_code = 1 end end @@ -78,7 +78,7 @@ class Chef else printed_something = true end - output "#{format_path(result.path)}:" + output "#{format_path(result)}:" print_results(children.map { |result| maybe_add_slash(result.name, result.dir?) }.sort, "") end @@ -89,7 +89,7 @@ class Chef begin children = result.children.sort_by { |child| child.name } rescue Chef::ChefFS::FileSystem::NotFoundError => e - ui.error "#{format_path(e.entry.path)}: No such file or directory" + ui.error "#{format_path(e.entry)}: No such file or directory" return [] end @@ -105,7 +105,7 @@ class Chef end def print_result_paths(results, indent = "") - print_results(results.map { |result| maybe_add_slash(format_path(result.path), result.dir?) }, indent) + print_results(results.map { |result| maybe_add_slash(format_path(result), result.dir?) }, indent) end def print_results(results, indent) |