diff options
Diffstat (limited to 'lib/chef/knife/node_delete.rb')
-rw-r--r-- | lib/chef/knife/node_delete.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/knife/node_delete.rb b/lib/chef/knife/node_delete.rb index 4dd7d764a1..b03569cded 100644 --- a/lib/chef/knife/node_delete.rb +++ b/lib/chef/knife/node_delete.rb @@ -27,18 +27,18 @@ class Chef require "chef/json_compat" end - banner "knife node delete NODE (options)" + banner "knife node delete [NODE[,NODE]] (options)" def run - @node_name = @name_args[0] - - if @node_name.nil? + if @name_args.length == 0 show_usage - ui.fatal("You must specify a node name") + ui.fatal("You must specify at least one node name") exit 1 end - delete_object(Chef::Node, @node_name) + @name_args.each do |node_name| + delete_object(Chef::Node, node_name) + end end end |