Right now if you have an .npmrc at the project root that is not respected but rather the following piece of code just checks the .npmrc in the HOME directory
|
let npmrcPath = `${process.env.HOME}/.npmrc`; |
|
if (fs.existsSync(npmrcPath)) { |
|
console.log("Found existing .npmrc file"); |
|
} else { |
|
console.log("No .npmrc file found, creating one"); |
|
fs.writeFileSync( |
|
npmrcPath, |
|
`//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}` |
|
); |
|
} |
Even the ideal flow for npm or any process is they check for .npmrc at the project root if not then they look for .npmrc in the HOME directory.
Right now if you have an
.npmrcat the project root that is not respected but rather the following piece of code just checks the.npmrcin the HOME directoryaction/src/index.ts
Lines 44 to 53 in cd904b9
Even the ideal flow for npm or any process is they check for
.npmrcat the project root if not then they look for.npmrcin the HOME directory.