         error.stderr = stderr
         callback(error)
 
-    @runCommand(command, args, exit)
+    @runCommand(args, exit)

    atom.packages.deactivatePackage(name) if atom.packages.isPackageActive(name)
    atom.packages.unloadPackage(name) if atom.packages.isPackageLoaded(name)

    command = @apmCommand
    args = ['install', "#{name}@#{version}"]
    exit = (code, stdout, stderr) =>
      if code is 0

class PackageManager
  Emitter.includeInto(this)

  runCommand: (args, callback) ->
    command = atom.packages.getApmPath()
    outputLines = []
    stdout = (lines) -> outputLines.push(lines)
    errorLines = []
