Skip to content

Commit

Permalink
Execute npm checks in dry run
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Sep 3, 2020
1 parent ca99caf commit 4027149
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/plugin/npm/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class npm extends Plugin {
isRegistryUp() {
const registry = this.getRegistry();
const registryArg = registry ? ` --registry ${registry}` : '';
return this.exec(`npm ping${registryArg}`).then(
return this.exec(`npm ping${registryArg}`, { options }).then(
() => true,
err => {
if (/code E40[04]|404.*(ping not found|No content for path)/.test(err)) {
Expand All @@ -113,7 +113,7 @@ class npm extends Plugin {
isAuthenticated() {
const registry = this.getRegistry();
const registryArg = registry ? ` --registry ${registry}` : '';
return this.exec(`npm whoami${registryArg}`).then(
return this.exec(`npm whoami${registryArg}`, { options }).then(
output => {
const username = output ? output.trim() : null;
this.setContext({ username });
Expand All @@ -137,7 +137,7 @@ class npm extends Plugin {
const { username } = this.getContext();
if (username === undefined) return true;
if (username === null) return false;
return this.exec(`npm access ls-collaborators ${name}${registryArg}`).then(
return this.exec(`npm access ls-collaborators ${name}${registryArg}`, { options }).then(
output => {
try {
const collaborators = JSON.parse(output);
Expand Down

0 comments on commit 4027149

Please sign in to comment.