Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
nodejs6.4721
npm_search_paths.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File npm_search_paths.patch of Package nodejs6.4721
Index: node-v6.3.0/deps/npm/lib/config/core.js =================================================================== --- node-v6.3.0.orig/deps/npm/lib/config/core.js +++ node-v6.3.0/deps/npm/lib/config/core.js @@ -151,16 +151,12 @@ function load_ (builtin, rc, cli, cb) { // Eg, `npm config get globalconfig --prefix ~/local` should // return `~/local/etc/npmrc` // annoying humans and their expectations! - if (conf.get('prefix')) { - var etc = path.resolve(conf.get('prefix'), 'etc') + var etc = path.resolve("/etc/nodejs") mkdirp(etc, function () { defaults.globalconfig = path.resolve(etc, 'npmrc') defaults.globalignorefile = path.resolve(etc, 'npmignore') afterUserContinuation() }) - } else { - afterUserContinuation() - } } function afterUserContinuation () { Index: node-v6.3.0/deps/npm/lib/help.js =================================================================== --- node-v6.3.0.orig/deps/npm/lib/help.js +++ node-v6.3.0/deps/npm/lib/help.js @@ -58,7 +58,7 @@ function help (args, cb) { } // npm help <section>: Try to find the path - var manroot = path.resolve(__dirname, '..', 'man') + var manroot = "/usr/share/man" // legacy if (section === 'global') section = 'folders' @@ -108,7 +108,7 @@ function viewMan (man, cb) { var section = path.basename(man, '.' + num) // at this point, we know that the specified man page exists - var manpath = path.join(__dirname, '..', 'man') + var manpath = "/usr/share/man" var env = {} Object.keys(process.env).forEach(function (i) { env[i] = process.env[i] Index: node-v6.3.0/deps/npm/lib/help-search.js =================================================================== --- node-v6.3.0.orig/deps/npm/lib/help-search.js +++ node-v6.3.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-v6.3.0/deps/npm/lib/config/defaults.js =================================================================== --- node-v6.3.0.orig/deps/npm/lib/config/defaults.js +++ node-v6.3.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 = {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor