class Chef::Knife::Download
Public Instance Methods
run()
click to toggle source
# File lib/chef/knife/download.rb, line 49 def run if name_args.length == 0 show_usage ui.fatal("Must specify at least one argument. If you want to download everything in this directory, type \"knife download .\"") exit 1 end error = false pattern_args.each do |pattern| if Chef::ChefFS::FileSystem.copy_to(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, config, ui, proc { |entry| format_path(entry) }) error = true end end if error exit 1 end end