summaryrefslogtreecommitdiff
path: root/lib/chef/knife/show.rb
diff options
context:
space:
mode:
authorjkeiser <jkeiser@opscode.com>2012-12-23 15:37:33 -0800
committerJohn Keiser <jkeiser@opscode.com>2013-06-07 13:12:13 -0700
commit46f93b08adc69725f867852bdd730224eb97cb97 (patch)
tree5ba3c06f85593b9e4752aa0392c18a7a0c9a77f2 /lib/chef/knife/show.rb
parentaacbb12ceed58c5bda6586e79a637d459457f8e3 (diff)
downloadchef-46f93b08adc69725f867852bdd730224eb97cb97.tar.gz
Use knife "ui.output" instead of puts
Diffstat (limited to 'lib/chef/knife/show.rb')
-rw-r--r--lib/chef/knife/show.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/knife/show.rb b/lib/chef/knife/show.rb
index 16d4eb2dab..e0dd17974d 100644
--- a/lib/chef/knife/show.rb
+++ b/lib/chef/knife/show.rb
@@ -18,14 +18,14 @@ class Chef
pattern_args.each do |pattern|
Chef::ChefFS::FileSystem.list(config[:local] ? local_fs : chef_fs, pattern) do |result|
if result.dir?
- STDERR.puts "#{result.path_for_printing}: is a directory" if pattern.exact_path
+ ui.error "#{result.path_for_printing}: is a directory" if pattern.exact_path
else
begin
value = result.read
- puts "#{result.path_for_printing}:"
+ output "#{result.path_for_printing}:"
output(format_for_display(value))
rescue Chef::ChefFS::FileSystem::NotFoundError
- STDERR.puts "#{result.path_for_printing}: No such file or directory"
+ ui.error "#{result.path_for_printing}: No such file or directory"
end
end
end