File npm_search_paths.patch of Package nodejs16
33
1
Index: node-v16.14.0/deps/npm/lib/npm.js
2
===================================================================
3
--- node-v16.14.0.orig/deps/npm/lib/npm.js
4
+++ node-v16.14.0/deps/npm/lib/npm.js
5
6
}
7
8
get globalPrefix () {
9
- return this.config.globalPrefix
10
+ let prefix = this.config.globalPrefix
11
+
12
+ // don't poop all over distro territory - use /usr/local instead
13
+ if (prefix === '/usr')
14
+ return '/usr/local'
15
+
16
+ return prefix;
17
}
18
19
set globalPrefix (r) {
20
Index: node-v16.14.0/deps/npm/lib/commands/help-search.js
21
===================================================================
22
--- node-v16.14.0.orig/deps/npm/lib/commands/help-search.js
23
+++ node-v16.14.0/deps/npm/lib/commands/help-search.js
24
25
throw this.usageError()
26
}
27
28
- const docPath = path.resolve(__dirname, '..', '..', 'docs/content')
29
+ const docPath = '/usr/share/doc/packages/nodejs'
30
const files = await glob(`${docPath}/*/*.md`)
31
const data = await this.readFiles(files)
32
const results = await this.searchFiles(args, data, files)
33