From f17bf47c7430b9a4457a551f47270a2b102962ee Mon Sep 17 00:00:00 2001 From: Jitender Pal Singh Date: Mon, 13 Jul 2026 10:26:05 +0530 Subject: [PATCH] refactor: enhance debug logging for Node installation failure --- dist/setup/index.js | 3 +-- src/distributions/official_builds/official_builds.ts | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index ceefc9b6..b08940b0 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -58061,8 +58061,7 @@ class OfficialBuilds extends base_distribution_1.default { catch (err) { throw new Error(`Node installation failed. Node may not be installed or not on PATH: ${err.message}`); } - core.debug(`Expected Node version: ${expectedVersion}`); - core.debug(`Actual Node version: ${actualVersion}`); + core.debug(`Node installation failed: expected ${expectedVersion} but "node --version" reported ${actualVersion || '(empty)'} (installedDir: ${installedDir}).`); if (actualVersion !== expectedVersion) { throw new Error(`Node ${expectedVersion} installation failed, likely due to an incomplete or corrupted download.`); } diff --git a/src/distributions/official_builds/official_builds.ts b/src/distributions/official_builds/official_builds.ts index 3ce10723..6075ac5b 100644 --- a/src/distributions/official_builds/official_builds.ts +++ b/src/distributions/official_builds/official_builds.ts @@ -342,8 +342,9 @@ export default class OfficialBuilds extends BaseDistribution { `Node installation failed. Node may not be installed or not on PATH: ${(err as Error).message}` ); } - core.debug(`Expected Node version: ${expectedVersion}`); - core.debug(`Actual Node version: ${actualVersion}`); + core.debug( + `Node installation failed: expected ${expectedVersion} but "node --version" reported ${actualVersion || '(empty)'} (installedDir: ${installedDir}).` + ); if (actualVersion !== expectedVersion) { throw new Error( `Node ${expectedVersion} installation failed, likely due to an incomplete or corrupted download.`