File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
module . exports = adduser
2
2
3
- var log = require ( 'npmlog' )
4
- var npm = require ( './npm.js' )
5
- var usage = require ( './utils/usage' )
6
- var crypto
3
+ const log = require ( 'npmlog' )
4
+ const npm = require ( './npm.js' )
5
+ const usage = require ( './utils/usage' )
6
+ let crypto
7
7
8
8
try {
9
9
crypto = require ( 'crypto' )
@@ -21,20 +21,21 @@ function adduser (args, cb) {
21
21
) )
22
22
}
23
23
24
- var registry = npm . config . get ( 'registry' )
25
- var scope = npm . config . get ( 'scope' )
26
- var creds = npm . config . getCredentialsByURI ( npm . config . get ( 'registry' ) )
24
+ let registry = npm . config . get ( 'registry' )
25
+ const scope = npm . config . get ( 'scope' )
26
+ const creds = npm . config . getCredentialsByURI ( npm . config . get ( 'registry' ) )
27
27
28
28
if ( scope ) {
29
- var scopedRegistry = npm . config . get ( scope + ':registry' )
30
- var cliRegistry = npm . config . get ( 'registry' , 'cli' )
29
+ const scopedRegistry = npm . config . get ( scope + ':registry' )
30
+ const cliRegistry = npm . config . get ( 'registry' , 'cli' )
31
31
if ( scopedRegistry && ! cliRegistry ) registry = scopedRegistry
32
32
}
33
33
34
34
log . disableProgress ( )
35
35
36
+ let auth
36
37
try {
37
- var auth = require ( './auth/' + npm . config . get ( 'auth-type' ) )
38
+ auth = require ( './auth/' + npm . config . get ( 'auth-type' ) )
38
39
} catch ( e ) {
39
40
return cb ( new Error ( 'no such auth module' ) )
40
41
}
You can’t perform that action at this time.
0 commit comments