 
     fs.makeTreeSync(@atomDirectory)
 
-    config.loadNpm (error, npm) =>
-      # node-gyp doesn't currently have an option for this so just set the
-      # environment variable to bypass strict SSL
-      # https://github.com/TooTallNate/node-gyp/issues/448
-      useStrictSsl = npm.config.get('strict-ssl') ? true
-      env.NODE_TLS_REJECT_UNAUTHORIZED = 0 unless useStrictSsl
-
-      # Pass through configured proxy to node-gyp
-      proxy = npm.config.get('https-proxy') or npm.config.get('proxy')
-      installNodeArgs.push("--proxy=#{proxy}") if proxy
-
-      opts = {env, cwd: @atomDirectory}
-      opts.streaming = true if @verbose
-
-      @fork @atomNodeGypPath, installNodeArgs, opts, (code, stderr='', stdout='') ->
-        if code is 0
-          callback()
-        else
-          callback("#{stdout}\n#{stderr}")
+    # node-gyp doesn't currently have an option for this so just set the
+    # environment variable to bypass strict SSL
+    # https://github.com/TooTallNate/node-gyp/issues/448
+    useStrictSsl = @npm.config.get('strict-ssl') ? true
+    env.NODE_TLS_REJECT_UNAUTHORIZED = 0 unless useStrictSsl
+
+    # Pass through configured proxy to node-gyp
+    proxy = @npm.config.get('https-proxy') or @npm.config.get('proxy')
+    installNodeArgs.push("--proxy=#{proxy}") if proxy
+
+    opts = {env, cwd: @atomDirectory}
+    opts.streaming = true if @verbose
+
+    @fork @atomNodeGypPath, installNodeArgs, opts, (code, stderr='', stdout='') ->
+      if code is 0
+        callback()
+      else
+        callback("#{stdout}\n#{stderr}")
 
   updateWindowsEnv: (env) ->
     env.USERPROFILE = env.HOME

      packageNames.push('.') if packageNames.length is 0

    commands = []
    commands.push (callback) => @loadInstalledAtomVersion(callback)
    packageNames.forEach (packageName) ->
      commands.push (callback) -> installPackage(packageName, callback)

    env = _.extend({}, process.env, HOME: @atomNodeDirectory)
    @updateWindowsEnv(env) if config.isWin32()
    @addNodeBinToEnv(env)
    @addProxyToEnv(env)
    installOptions = {env}
    installOptions.cwd = options.cwd if options.cwd
    installOptions.streaming = true if @verbose
