Skip to content

Commit

Permalink
fix: logout from custom registry
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Oct 12, 2023
1 parent 8423d4f commit 5b6172f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/commands/logout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const getAuth = require('npm-registry-fetch/lib/auth.js')
const npmFetch = require('npm-registry-fetch')
const { getAuth } = npmFetch
const log = require('../utils/log-shim')
const BaseCommand = require('../base-command.js')

Expand All @@ -26,6 +26,7 @@ class Logout extends BaseCommand {
log.verbose('logout', `clearing token for ${reg}`)
await npmFetch(`/-/user/token/${encodeURIComponent(auth.token)}`, {
...this.npm.flatOptions,
registry: reg,
method: 'DELETE',
ignoreBody: true,
})
Expand Down

0 comments on commit 5b6172f

Please sign in to comment.