From cd1f860ccf96bc3bcdf2a64fad1763698cefff3d Mon Sep 17 00:00:00 2001 From: Manas Jayanth <3097018+ManasJayanth@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:14:38 +0530 Subject: [PATCH] wip: add logs --- dist/index.js | 4 ++++ index.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/dist/index.js b/dist/index.js index bc32acf..c7c7747 100644 --- a/dist/index.js +++ b/dist/index.js @@ -180340,12 +180340,16 @@ function main() { version = setupEsyTarball; checksum = setupEsyShaSum; } + console.log("Fetching tarball from", tarballUrl); const downloadedEsyNPMTarball = yield tool_cache.downloadTool(tarballUrl); const checksumAlgo = "sha1"; const computedChecksum = yield computeChecksum(downloadedEsyNPMTarball, checksumAlgo); if (computedChecksum !== checksum) { throw new Error(`Downloaded by checksum failed. url: ${setupEsyTarball} downloadPath: ${downloadedEsyNPMTarball} checksum expected: ${checksum} checksum computed: ${computedChecksum} checksum algorithm: ${checksumAlgo}`); } + else { + console.log("Checksum validation succeeded. Downloaded tarball's checksum is:", checksum); + } const extractedEsyNPM = yield tool_cache.extractTar(downloadedEsyNPMTarball); core.startGroup("Running postinstall"); const esyPackagePath = external_path_.join(extractedEsyNPM, "package"); diff --git a/index.ts b/index.ts index e832105..3092b0d 100644 --- a/index.ts +++ b/index.ts @@ -97,6 +97,7 @@ async function main() { version = setupEsyTarball; checksum = setupEsyShaSum; } + console.log("Fetching tarball from", tarballUrl); const downloadedEsyNPMTarball = await toolCache.downloadTool(tarballUrl); const checksumAlgo = "sha1"; const computedChecksum = await computeChecksum( @@ -107,6 +108,11 @@ async function main() { throw new Error( `Downloaded by checksum failed. url: ${setupEsyTarball} downloadPath: ${downloadedEsyNPMTarball} checksum expected: ${checksum} checksum computed: ${computedChecksum} checksum algorithm: ${checksumAlgo}` ); + } else { + console.log( + "Checksum validation succeeded. Downloaded tarball's checksum is:", + checksum + ); } const extractedEsyNPM = await toolCache.extractTar(