Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix npm access error(#665) #666

Merged
merged 18 commits into from Dec 27, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/npm/util.js
Expand Up @@ -68,13 +68,13 @@ exports.collaborators = async pkg => {
const packageName = pkg.name;
ow(packageName, ow.string);

const args = ['access', 'ls-collaborators', packageName];
const args = [packageName];
if (exports.isExternalRegistry(pkg)) {
args.push('--registry', pkg.publishConfig.registry);
}

try {
const {stdout} = await execa('npm', args);
const {stdout} = await execa('npm access list collaborators', args);
sindresorhus marked this conversation as resolved.
Show resolved Hide resolved
return stdout;
} catch (error) {
// Ignore non-existing package error
Expand Down