diff --git a/dist/index.js b/dist/index.js index 81d3c7dd..98ffaa51 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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); } diff --git a/src/authutil.ts b/src/authutil.ts index 59cc0385..93c959c9 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -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 {