File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function writeRegistryToFile(
2929 scope = '@' + scope ;
3030 }
3131 if ( scope ) {
32- scope = scope . toLowerCase ( ) ;
32+ scope = scope . toLowerCase ( ) + ':' ;
3333 }
3434
3535 core . debug ( `Setting auth in ${ fileLocation } ` ) ;
@@ -38,17 +38,15 @@ function writeRegistryToFile(
3838 const curContents : string = fs . readFileSync ( fileLocation , 'utf8' ) ;
3939 curContents . split ( os . EOL ) . forEach ( ( line : string ) => {
4040 // Add current contents unless they are setting the registry
41- if ( ! line . toLowerCase ( ) . startsWith ( ' registry' ) ) {
41+ if ( ! line . toLowerCase ( ) . startsWith ( ` ${ scope } registry` ) ) {
4242 newContents += line + os . EOL ;
4343 }
4444 } ) ;
4545 }
4646 // Remove http: or https: from front of registry.
4747 const authString : string =
4848 registryUrl . replace ( / ( ^ \w + : | ^ ) / , '' ) + ':_authToken=${NODE_AUTH_TOKEN}' ;
49- const registryString : string = scope
50- ? `${ scope } :registry=${ registryUrl } `
51- : `registry=${ registryUrl } ` ;
49+ const registryString : string = `${ scope } registry=${ registryUrl } ` ;
5250 const alwaysAuthString : string = `always-auth=${ alwaysAuth } ` ;
5351 newContents += `${ authString } ${ os . EOL } ${ registryString } ${ os . EOL } ${ alwaysAuthString } ` ;
5452 fs . writeFileSync ( fileLocation , newContents ) ;
You can’t perform that action at this time.
0 commit comments