Skip to content

Commit 9f08280

Browse files
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
1 parent d4d3bb0 commit 9f08280

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

dist/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ async function installGitHubReleaseBinary(
8787
if (fs.existsSync(destinationFilename)) {
8888
if (ignoreExisting) {
8989
core.info(`Binary already exists at ${destinationFilename}, ignoring and leaving system as-is`);
90+
// Still add the directory to PATH so the binary can be found
91+
core.addPath(destinationDirectory);
9092
return;
9193
}
9294
}

0 commit comments

Comments
 (0)