From 527b66817c51988da3b03f5f5f423a8c7a944991 Mon Sep 17 00:00:00 2001 From: Edward Romero Date: Tue, 23 Jun 2020 20:34:30 -0400 Subject: [PATCH] Add logging around to find issue --- src/authutil.ts | 5 ++++- src/main.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/authutil.ts b/src/authutil.ts index 259e8bc0..a4df3d80 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -35,6 +35,7 @@ async function getAuthToken( maxRetries: 3 }); let response: hc.HttpClientResponse = await httpClient.get(authUrl); + console.log(response); let body: string = await response.readBody(); core.info(body); let data: any = JSON.parse(body); @@ -48,6 +49,7 @@ async function writeRegistryToFile( alwaysAuth: string ) { let scope: string = core.getInput('scope'); + console.log(`scope: ${scope}`); if (!scope && registryUrl.indexOf('npm.pkg.github.com') > -1) { scope = github.context.repo.owner; } @@ -58,7 +60,7 @@ async function writeRegistryToFile( scope = scope.toLowerCase(); } - core.info(`Setting auth in ${fileLocation}`); + console.log(`Setting auth in ${fileLocation}`); let newContents: string = ''; if (fs.existsSync(fileLocation)) { const curContents: string = fs.readFileSync(fileLocation, 'utf8'); @@ -74,6 +76,7 @@ async function writeRegistryToFile( // Check if auth url provided const authUrl: string = core.getInput('auth-url'); if (authUrl) { + console.log(`authUrl: ${authUrl}`); // Check if username and password/token provided const authUser: string = core.getInput('auth-user'); const authPassword: string = core.getInput('auth-password'); diff --git a/src/main.ts b/src/main.ts index 12ecb3fe..7531b2cf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -26,6 +26,7 @@ export async function run() { const registryUrl: string = core.getInput('registry-url'); const alwaysAuth: string = core.getInput('always-auth'); if (registryUrl) { + console.log(`registryUrl: ${registryUrl}`); await auth.configAuthentication(registryUrl, alwaysAuth); }