mirror of
				https://github.com/actions/setup-node.git
				synced 2025-11-04 13:33:34 +00:00 
			
		
		
		
	Merge pull request #2 from Watemlifts/deepsource-fix-da8132c7
Fix explicit type declarations
This commit is contained in:
		
						commit
						c4d243823c
					
				@ -33,7 +33,7 @@ function writeRegistryToFile(
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  core.debug(`Setting auth in ${fileLocation}`);
 | 
					  core.debug(`Setting auth in ${fileLocation}`);
 | 
				
			||||||
  let newContents: string = '';
 | 
					  let newContents = '';
 | 
				
			||||||
  if (fs.existsSync(fileLocation)) {
 | 
					  if (fs.existsSync(fileLocation)) {
 | 
				
			||||||
    const curContents: string = fs.readFileSync(fileLocation, 'utf8');
 | 
					    const curContents: string = fs.readFileSync(fileLocation, 'utf8');
 | 
				
			||||||
    curContents.split(os.EOL).forEach((line: string) => {
 | 
					    curContents.split(os.EOL).forEach((line: string) => {
 | 
				
			||||||
@ -49,7 +49,7 @@ function writeRegistryToFile(
 | 
				
			|||||||
  const registryString: string = scope
 | 
					  const registryString: string = scope
 | 
				
			||||||
    ? `${scope}:registry=${registryUrl}`
 | 
					    ? `${scope}:registry=${registryUrl}`
 | 
				
			||||||
    : `registry=${registryUrl}`;
 | 
					    : `registry=${registryUrl}`;
 | 
				
			||||||
  const alwaysAuthString: string = `always-auth=${alwaysAuth}`;
 | 
					  const alwaysAuthString = `always-auth=${alwaysAuth}`;
 | 
				
			||||||
  newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
 | 
					  newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`;
 | 
				
			||||||
  fs.writeFileSync(fileLocation, newContents);
 | 
					  fs.writeFileSync(fileLocation, newContents);
 | 
				
			||||||
  core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
 | 
					  core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user