    # File lib/chef/knife/node_run_list_add.rb, line 37
          def run
            node = Chef::Node.load(@name_args[0])
            if @name_args.size > 2
              # Check for nested lists and create a single plain one
              entries = @name_args[1..-1].map do |entry|
                entry.split(',').map { |e| e.strip }
              end.flatten
            else
              # Convert to array and remove the extra spaces
              entries = @name_args[1].split(',').map { |e| e.strip }
            end

            add_to_run_list(node, entries, config[:after])

            node.save

            config[:run_list] = true

            output(format_for_display(node))
          end