Sha256: 4b1f872081a5bc28e6ac9f5fbfc384316e096c2192909eadb5d1e197bcea2a3b
Contents?: true
Size: 866 Bytes
Versions: 3
Compression:
Stored size: 866 Bytes
Contents
require 'chef_fs/knife' require 'chef_fs/file_system' class Chef class Knife class Show < ChefFS::Knife banner "knife show [PATTERN1 ... PATTERNn]" common_options def run # Get the matches (recursively) pattern_args.each do |pattern| ChefFS::FileSystem.list(chef_fs, pattern) do |result| if result.dir? STDERR.puts "#{result.path_for_printing}: is a directory" if pattern.exact_path else begin value = result.read puts "#{result.path_for_printing}:" output(format_for_display(value)) rescue ChefFS::FileSystem::NotFoundError STDERR.puts "#{result.path_for_printing}: No such file or directory" end end end end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
knife-essentials-0.7.6 | lib/chef/knife/show.rb |
knife-essentials-0.7.5 | lib/chef/knife/show.rb |
knife-essentials-0.7.4 | lib/chef/knife/show.rb |