# File lib/chef/client.rb, line 185
    def setup_run_context
      if Chef::Config[:solo]
        Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::FileSystemFileVendor.new(manifest, Chef::Config[:cookbook_path]) }
        run_context = Chef::RunContext.new(node, Chef::CookbookCollection.new(Chef::CookbookLoader.new(Chef::Config[:cookbook_path])))
      else
        Chef::Cookbook::FileVendor.on_create { |manifest| Chef::Cookbook::RemoteFileVendor.new(manifest, rest) }
        cookbook_hash = sync_cookbooks
        run_context = Chef::RunContext.new(node, Chef::CookbookCollection.new(cookbook_hash))
      end
      run_status.run_context = run_context
      run_context.load(@run_list_expansion)
      assert_cookbook_path_not_empty(run_context)
      run_context
    end