File npm_search_paths.patch of Package nodejs8.9924

Index: node-v8.12.0/deps/npm/lib/help-search.js
===================================================================
--- node-v8.12.0.orig/deps/npm/lib/help-search.js
+++ node-v8.12.0/deps/npm/lib/help-search.js
@@ -18,7 +18,7 @@ function helpSearch (args, silent, cb) {
   }
   if (!args.length) return cb(helpSearch.usage)
 
-  var docPath = path.resolve(__dirname, '..', 'doc')
+  var docPath = "/usr/share/doc/packages/nodejs"
   return glob(docPath + '/*/*.md', function (er, files) {
     if (er) return cb(er)
     readFiles(files, function (er, data) {
Index: node-v8.12.0/deps/npm/lib/config/defaults.js
===================================================================
--- node-v8.12.0.orig/deps/npm/lib/config/defaults.js
+++ node-v8.12.0/deps/npm/lib/config/defaults.js
@@ -102,6 +102,11 @@ Object.defineProperty(exports, 'defaults
     if (process.env.DESTDIR) {
       globalPrefix = path.join(process.env.DESTDIR, globalPrefix)
     }
+
+    // don't poop all over distro territory - use /usr/local instead
+    if (globalPrefix === '/usr') {
+      globalPrefix = path.join(globalPrefix, '/local');
+    }
   }
 
   defaults = {
openSUSE Build Service is sponsored by