File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ function loadNxConfig(configFile) {
9090 return JSON . parse ( nx ) ;
9191}
9292
93- export function verifyNpmAuth ( registry = NPM_DEFEAULT_REGISTRY ) {
93+ function verifyNpmAuth ( registry = NPM_DEFEAULT_REGISTRY ) {
9494 const npmErrorRegex = / n p m e r r o r c o d e ( \w + ) / ;
9595 const spawnOptions = {
9696 stdio : /** @type {const } */ ( "pipe" ) ,
@@ -103,7 +103,8 @@ export function verifyNpmAuth(registry = NPM_DEFEAULT_REGISTRY) {
103103 if ( whoami . status !== 0 ) {
104104 const error = whoami . stderr . toString ( ) ;
105105 const m = error . match ( npmErrorRegex ) ;
106- switch ( m && m [ 1 ] ) {
106+ const errorCode = m && m [ 1 ] ;
107+ switch ( errorCode ) {
107108 case "EINVALIDNPMTOKEN" :
108109 throw new Error ( `Invalid auth token for npm registry: ${ registry } ` ) ;
109110 case "ENEEDAUTH" :
You can’t perform that action at this time.
0 commit comments