diff options
author | jkeiser <jkeiser@opscode.com> | 2012-12-23 15:37:33 -0800 |
---|---|---|
committer | John Keiser <jkeiser@opscode.com> | 2013-06-07 13:12:13 -0700 |
commit | 46f93b08adc69725f867852bdd730224eb97cb97 (patch) | |
tree | 5ba3c06f85593b9e4752aa0392c18a7a0c9a77f2 /lib/chef/knife/show.rb | |
parent | aacbb12ceed58c5bda6586e79a637d459457f8e3 (diff) | |
download | chef-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.rb | 6 |
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 |