From 7b19d1b0f62a7e994e48f6bb1555381398219f23 Mon Sep 17 00:00:00 2001 From: David Hiendl Date: Thu, 28 Dec 2023 20:37:16 +0100 Subject: [PATCH] cleanup debug output --- dist/index.js | 9 ++------- src/lib.js | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/dist/index.js b/dist/index.js index 794d4d4..458fe06 100644 --- a/dist/index.js +++ b/dist/index.js @@ -62169,12 +62169,11 @@ function mergeArgRegistryAuthJson(registryAuthJson) { function mergeExistingDockerAuthJson(registryAuthJson, targetFile) { if (!core.getBooleanInput('merge_existing_auth_json')) { - console.log('merge_existing_auth_json is disabled'); return; } if (!external_fs_.existsSync(targetFile)) { - console.log(`${targetFile} does not exist`); + console.log(`no pre-existing config found, skipping merge: ${targetFile}`); return; } @@ -62184,16 +62183,12 @@ function mergeExistingDockerAuthJson(registryAuthJson, targetFile) { if (existingJson.auths != null && typeof existingJson.auths === 'object') { for (const key in existingJson.auths) { - console.log(`existingJson.auths.${key}`); if (existingJson.auths.hasOwnProperty(key)) { - console.log(`existingJson.auths.${key} has own property, assigning value`); + console.log(`merging existingJson.auths[${key}]`); registryAuthJson.auths[key] = existingJson.auths[key]; } } } - else { - console.log('existingJson.auths is ' + typeof existingJson.auths); - } } catch (e) { console.log(`Failed to parse existing docker auth json in file: ${targetFile}"`); diff --git a/src/lib.js b/src/lib.js index 3928670..e9b8c6f 100644 --- a/src/lib.js +++ b/src/lib.js @@ -62,12 +62,11 @@ export function mergeArgRegistryAuthJson(registryAuthJson) { export function mergeExistingDockerAuthJson(registryAuthJson, targetFile) { if (!core.getBooleanInput('merge_existing_auth_json')) { - console.log('merge_existing_auth_json is disabled'); return; } if (!fs.existsSync(targetFile)) { - console.log(`${targetFile} does not exist`); + console.log(`no pre-existing config found, skipping merge: ${targetFile}`); return; } @@ -77,16 +76,12 @@ export function mergeExistingDockerAuthJson(registryAuthJson, targetFile) { if (existingJson.auths != null && typeof existingJson.auths === 'object') { for (const key in existingJson.auths) { - console.log(`existingJson.auths.${key}`); if (existingJson.auths.hasOwnProperty(key)) { - console.log(`existingJson.auths.${key} has own property, assigning value`); + console.log(`merging existingJson.auths[${key}]`); registryAuthJson.auths[key] = existingJson.auths[key]; } } } - else { - console.log('existingJson.auths is ' + typeof existingJson.auths); - } } catch (e) { console.log(`Failed to parse existing docker auth json in file: ${targetFile}"`);