You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: role_env_run_list_add.rb
    path of file: ./repos/chef/knife/lib/chef/knife
    
    the code of the file until where you have to start completion: #
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: William Albenzi (<walbenzi@gmail.com>)
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, 
    
      def run
        role = Chef::Role.load(@name_args[0])
        role.name(@name_args[0])
        environment = @name_args[1]

        if @name_args.size > 2
          # Check for nested lists and create a single plain one
          entries = @name_args[2..].map do |entry|
            entry.split(",").map(&:strip)
          end.flatten
        else
          # Convert to array and remove the extra spaces
          entries = @name_args[2].split(",").map(&:strip)
        end

        add_to_env_run_list(role, environment, entries, config[:after])
        role.save
        config[:env_run_list] = true
        output(format_for_display(role))
      end