Skip to content

Commit 5b6172f

Browse files
committedOct 12, 2023
fix: logout from custom registry
1 parent 8423d4f commit 5b6172f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/commands/logout.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const getAuth = require('npm-registry-fetch/lib/auth.js')
21
const npmFetch = require('npm-registry-fetch')
2+
const { getAuth } = npmFetch
33
const log = require('../utils/log-shim')
44
const BaseCommand = require('../base-command.js')
55

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

0 commit comments

Comments
 (0)
Please sign in to comment.