1
0
Fork 0
mirror of https://github.com/actions/setup-node synced 2025-04-10 02:45:50 +00:00

add more logging to debug

This commit is contained in:
Edward Romero 2020-06-23 21:05:03 -04:00
parent e64e8b870d
commit 57b2563e28
2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View file

@ -4776,7 +4776,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
? `${scope}:registry=${registryUrl}`
: `registry=${registryUrl}`;
const alwaysAuthString = `always-auth=${alwaysAuth}`;
if (scope && includeBothRegistries) {
if (scope && includeBothRegistries === "true") {
const registryStringNoScope = `registry=${registryUrl}`;
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`;
}
@ -4786,6 +4786,7 @@ function writeRegistryToFile(registryUrl, fileLocation, alwaysAuth) {
console.log(newContents);
fs.writeFileSync(fileLocation, newContents);
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
console.log(nodeAuthToken);
if (defaultNodeAuthToken !== nodeAuthToken) {
core.exportVariable('NODE_AUTH_TOKEN', nodeAuthToken);
}

View file

@ -100,7 +100,7 @@ async function writeRegistryToFile(
: `registry=${registryUrl}`;
const alwaysAuthString: string = `always-auth=${alwaysAuth}`;
if(scope && includeBothRegistries) {
if(scope && includeBothRegistries === "true") {
const registryStringNoScope = `registry=${registryUrl}`;
newContents += `${authString}${os.EOL}${registryString}${os.EOL}${registryStringNoScope}${os.EOL}${alwaysAuthString}`;
} else {
@ -110,6 +110,7 @@ async function writeRegistryToFile(
console.log(newContents);
fs.writeFileSync(fileLocation, newContents);
core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);
console.log(nodeAuthToken);
if (defaultNodeAuthToken !== nodeAuthToken) {
core.exportVariable('NODE_AUTH_TOKEN', nodeAuthToken)
} else {