Skip to content

Commit

Permalink
fix: publish: skip login check on dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-js committed Jan 6, 2021
1 parent 591965f commit 8901c56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const publish_ = async (arg, opts) => {
}

const creds = npm.config.getCredentialsByURI(registry)
if (!creds.token && !creds.username) {
if (!dryRun && !creds.token && !creds.username) {
throw Object.assign(new Error('This command requires you to be logged in.'), {
code: 'ENEEDAUTH',
})
Expand Down

0 comments on commit 8901c56

Please sign in to comment.