diff options
-rw-r--r-- | lib/logout.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/logout.js b/lib/logout.js index 128a62692..861a50a23 100644 --- a/lib/logout.js +++ b/lib/logout.js @@ -17,13 +17,8 @@ const cmd = (args, cb) => logout(args).then(() => cb()).catch(cb) const logout = async (args) => { const { registry, scope } = npm.flatOptions - const regRef = `${scope}:registry` - let reg = registry - - if (scope) { - const scopedRef = npm.flatOptions[regRef] - reg = scopedRef || reg - } + const regRef = scope ? `${scope}:registry` : 'registry' + const reg = npm.flatOptions[regRef] || registry const auth = getAuth(reg, npm.flatOptions) |