             source = path.join(nodeModulesDirectory, child)
             destination = path.join(@atomPackagesDirectory, child)
             fs.cp(source, destination, forceDelete: true)
+          process.stdout.write '\u2713\n'.green
+
+        callback()
+      else
+        if installGlobally
           fs.rm(installDirectory)
-
-        process.stdout.write '\u2713\n'.green
-        callback()
-      else
-        fs.rm(installDirectory) if installGlobally
-
-        process.stdout.write '\u2717\n'.red
+          process.stdout.write '\u2717\n'.red
+
         callback("#{stdout}\n#{stderr}")
 
   installModules: (options, callback) =>


    installGlobally = options.installGlobally ? true
    if installGlobally
      installDirectory = temp.mkdirSync('apm-install-dir-')
      nodeModulesDirectory = path.join(installDirectory, 'node_modules')
      fs.mkdir(nodeModulesDirectory)


  installModule: (options, pack, modulePath, callback) ->
    label = "#{pack.name}@#{pack['dist-tags'].latest}"

    vsArgs = null
    if config.isWin32()
