1 | ;
|
2 |
|
3 | const fs = require("fs-extra");
|
4 | const path = require("path");
|
5 |
|
6 | module.exports = builtinNpmrc;
|
7 |
|
8 | function builtinNpmrc() {
|
9 | let resolvedPath = "";
|
10 |
|
11 | try {
|
12 | // e.g., /usr/local/lib/node_modules/npm/npmrc
|
13 | resolvedPath = path.resolve(
|
14 | fs.realpathSync(path.join(path.dirname(process.execPath), "npm")),
|
15 | "../../npmrc"
|
16 | );
|
17 | } catch (err) {
|
18 | // ignore
|
19 | }
|
20 |
|
21 | return resolvedPath;
|
22 | }
|