lib/chef/knife/download_essentials.rb in knife-essentials-0.8.3 vs lib/chef/knife/download_essentials.rb in knife-essentials-0.8.4
- old
+ new
@@ -40,11 +40,15 @@
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|
- ChefFS::FileSystem.copy_to(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, config, ui)
+ error ||= ChefFS::FileSystem.copy_to(pattern, chef_fs, local_fs, config[:recurse] ? nil : 1, config, ui, proc { |entry| format_path(entry.path) })
+ end
+ if error
+ exit 1
end
end
end
end
end