aboutsummaryrefslogtreecommitdiff
path: root/www/npm/files/extra-patch-bug-178881
blob: f0e0d5c8f6e8bfb3ae42905e370459c139ed972f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- lib/node_modules/npm/lib/config/defaults.js.orig	1985-10-26 08:15:00 UTC
+++ lib/node_modules/npm/lib/config/defaults.js
@@ -378,19 +378,7 @@ exports.types = {
 }
 
 function getLocalAddresses () {
-  var interfaces
-  // #8094: some environments require elevated permissions to enumerate
-  // interfaces, and synchronously throw EPERM when run without
-  // elevated privileges
-  try {
-    interfaces = os.networkInterfaces()
-  } catch (e) {
-    interfaces = {}
-  }
-
-  return Object.keys(interfaces).map(
-    nic => interfaces[nic].map(({address}) => address)
-  ).reduce((curr, next) => curr.concat(next), []).concat(undefined)
+  return [ '127.0.0.1', undefined ]
 }
 
 exports.shorthands = {