# class Chef::Knife::RoleShow

### Public Instance Methods

run() click to toggle source

    # File lib/chef/knife/role_show.rb, line 35
    def run
      @role_name = @name_args[0]

      if @role_name.nil?
        show_usage
        ui.fatal("You must specify a role name")
        exit 1
      end

      role = Chef::Role.load(@role_name)
      output(format_for_display(config[:environment] ? role.environment(config[:environment]) : role))
    end