         if semver.lt(plugin.version, @state.latest[plugin.packageName]) && @state.removeStatus[index] == 0
           updating[index] = true
           toUpdate.push plugin.packageName
-      npm.load {prefix: "#{PLUGIN_PATH}", registry: mirror[@state.mirror].server, http_proxy: 'http://127.0.0.1:12450'}, (err) ->
+      npm.load npmConfig, (err) ->
         npm.commands.update toUpdate, (er, data) ->
           callback()
       @setState

    if !@props.disabled
      updating = @state.updating
      updating[index] = true
      npm.load {prefix: "#{PLUGIN_PATH}", registry: mirror[@state.mirror].server, http_proxy: 'http://127.0.0.1:12450'}, (err) ->
        npm.commands.update [plugins[index].packageName], (er, data) ->
          callback(index)
      @setState {updating}

  onSelectServer: (state) ->
    config.set "packageManager.mirror", state
    server = mirror[state].server
    npmConfig = {
      prefix: "#{PLUGIN_PATH}",
      registry: mirror[state].server,
      http_proxy: 'http://127.0.0.1:12450'
    }
    @setState
      mirror: state
  handleEnable: (index) ->
