From 57b2563e2807396e1e2baf63a5096080342686ec Mon Sep 17 00:00:00 2001 From: Edward Romero Date: Tue, 23 Jun 2020 21:05:03 -0400 Subject: [PATCH] add more logging to debug --- dist/index.js | 3 ++- src/authutil.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 {