Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuy Adorno <ruyadorno@hotmail.com>2021-04-22 23:50:25 +0300
committerGar <gar+gh@danger.computer>2021-04-23 00:32:52 +0300
commit1c4eff7b513b8e84876818ede014d3ab19d203c6 (patch)
tree45dcc1c26f1fc9b1b15076cafd6f43bc95a3a619 /lib
parent83166ebcc4ba5e3bf215f08151437d96637f4f33 (diff)
fix(logout): use isBasicAuth attribute
PR-URL: https://github.com/npm/cli/pull/3126 Credit: @wraithgar Close: #3126 Reviewed-by: @darcyclarke
Diffstat (limited to 'lib')
-rw-r--r--lib/logout.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/logout.js b/lib/logout.js
index adc19a923..0887ec397 100644
--- a/lib/logout.js
+++ b/lib/logout.js
@@ -41,7 +41,7 @@ class Logout extends BaseCommand {
method: 'DELETE',
ignoreBody: true,
})
- } else if (auth.username || auth.password)
+ } else if (auth.isBasicAuth)
log.verbose('logout', `clearing user credentials for ${reg}`)
else {
const msg = `not logged in to ${reg}, so can't log out!`