diff options
Diffstat (limited to 'deps/npm/node_modules/npm-registry-fetch/auth.js')
-rw-r--r-- | deps/npm/node_modules/npm-registry-fetch/auth.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/npm/node_modules/npm-registry-fetch/auth.js b/deps/npm/node_modules/npm-registry-fetch/auth.js index fa696b97dd..d583982d0a 100644 --- a/deps/npm/node_modules/npm-registry-fetch/auth.js +++ b/deps/npm/node_modules/npm-registry-fetch/auth.js @@ -25,6 +25,12 @@ function getAuth (registry, opts) { if (AUTH.password) { AUTH.password = Buffer.from(AUTH.password, 'base64').toString('utf8') } + if (AUTH._auth && !(AUTH.username && AUTH.password)) { + let auth = Buffer.from(AUTH._auth, 'base64').toString() + auth = auth.split(':') + AUTH.username = auth.shift() + AUTH.password = auth.join(':') + } AUTH.alwaysAuth = AUTH.alwaysAuth === 'false' ? false : !!AUTH.alwaysAuth return AUTH } |