Fix the registry string.

This commit is contained in:
Iheanyi Ekechukwu 2019-08-06 12:23:49 -04:00
parent c970c05a19
commit b9164e8546
2 changed files with 3 additions and 3 deletions

View file

@ -45,9 +45,9 @@ function writeRegistryToFile(registryUrl, fileLocation) {
const registryString = scope const registryString = scope
? `${scope}:registry=${registryUrl}` ? `${scope}:registry=${registryUrl}`
: `registry=${registryUrl}`; : `registry=${registryUrl}`;
newContents += `${registryString}${os.EOL}${authString}`; newContents += `${authString}${os.EOL}${registryString}`;
fs.writeFileSync(fileLocation, newContents); fs.writeFileSync(fileLocation, newContents);
// core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation); // core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
// Export empty node_auth_token so npm doesn't complain about not being able to find it // Export empty node_auth_token so npm doesn't complain about not being able to find it
// core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX'); // core.exportVariable('NODE_AUTH_TOKEN', 'XXXXX-XXXXX-XXXXX-XXXXX');
} }

View file

@ -40,7 +40,7 @@ function writeRegistryToFile(registryUrl: string, fileLocation: string) {
const registryString = scope const registryString = scope
? `${scope}:registry=${registryUrl}` ? `${scope}:registry=${registryUrl}`
: `registry=${registryUrl}`; : `registry=${registryUrl}`;
newContents += `${registryString}${os.EOL}${authString}`; newContents += `${authString}${os.EOL}${registryString}`;
fs.writeFileSync(fileLocation, newContents); fs.writeFileSync(fileLocation, newContents);
// core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation); // core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
// Export empty node_auth_token so npm doesn't complain about not being able to find it // Export empty node_auth_token so npm doesn't complain about not being able to find it