Class: Chef::Knife::Upload
- Inherits:
-
ChefFS::Knife
- Object
- Chef::Knife
- ChefFS::Knife
- Chef::Knife::Upload
- Defined in:
- lib/chef/knife/upload.rb
Instance Method Summary collapse
Methods inherited from ChefFS::Knife
#chef_fs, #configure_chef, #create_chef_fs, #create_local_fs, deps, #discover_repo_dir, #format_path, inherited, #local_fs, #parallelize, #pattern_arg_from, #pattern_args, #pattern_args_from
Instance Method Details
#run ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/chef/knife/upload.rb', line 67 def run if name_args.length == 0 show_usage ui.fatal("You must specify at least one argument. If you want to upload everything in this directory, run \"knife upload .\"") exit 1 end error = false pattern_args.each do |pattern| fs_error, _result = Chef::ChefFS::FileSystem.copy_to(pattern, local_fs, chef_fs, config[:recurse] ? nil : 1, config, ui, proc { |entry| format_path(entry) }) if fs_error error = true end end if error exit 1 end end |