From 9f08280ad4cdd381e187d8c19ec78f8a87224299 Mon Sep 17 00:00:00 2001 From: Daniel Wright Date: Tue, 16 Sep 2025 09:39:45 +1000 Subject: [PATCH] fix: add binary directory to PATH when ignoring existing binaries When ignore-existing-binary is true and binary exists, the action would skip adding the directory to PATH, causing 'command not found' errors in subsequent workflow steps. Ticket: DO-14423 --- dist/index.js | 1 + src/index.ts | 2 ++ 2 files changed, 3 insertions(+) diff --git a/dist/index.js b/dist/index.js index 09fd14c..e059b50 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10198,6 +10198,7 @@ async function installGitHubReleaseBinary(octokit, targetRelease, storageDirecto if (fs.existsSync(destinationFilename)) { if (ignoreExisting) { core2.info(`Binary already exists at ${destinationFilename}, ignoring and leaving system as-is`); + core2.addPath(destinationDirectory); return; } } diff --git a/src/index.ts b/src/index.ts index 35e44af..1068c9c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -87,6 +87,8 @@ async function installGitHubReleaseBinary( if (fs.existsSync(destinationFilename)) { if (ignoreExisting) { core.info(`Binary already exists at ${destinationFilename}, ignoring and leaving system as-is`); + // Still add the directory to PATH so the binary can be found + core.addPath(destinationDirectory); return; } }