Skip to content

project's .npmrc not respected #58

Description

@kamleshchandnani

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

action/src/index.ts

Lines 44 to 53 in cd904b9

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions