Open
Description
After spending lot of time, I looked into the code & found that, the regex pattern is always matching for only registries pointing to npm
. In my case we have a custom artifactory the URL that looks like //art01.spotifycloud.io
Lines 62 to 64 in 31ff97e
Suggested solution
we can generalized the Regex and avoid hardcoding
const authLine = userNpmrcContent.split("\n").find((line) => {
// Dynamically adapt to any registry by looking for :_authToken= pattern
return /^\s*\/\/.*\/:[_-]authToken=/i.test(line);
});
Metadata
Assignees
Labels
No labels