Skip to content

Commit

Permalink
Merge pull request #33 from ObserverOfTime/patch-1
Browse files Browse the repository at this point in the history
Use `core.addPath` to add the executable to the path
  • Loading branch information
rhysd authored May 7, 2024
2 parents f86dc92 + 046d8d5 commit 43c28ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ async function main(): Promise<void> {
const config = loadConfigFromInputs();
console.log('Extracted configuration:', config);

const pathSep = process.platform === 'win32' ? ';' : ':';
const installed = await install(config);
await validateInstallation(installed);

core.exportVariable('PATH', `${installed.binDir}${pathSep}${process.env['PATH']}`);
core.debug(`'${installed.binDir}' was set to $PATH`);
core.addPath(installed.binDir);
core.debug(`'${installed.binDir}' was added to $PATH`);

const fullPath = join(installed.binDir, installed.executable);
core.setOutput('executable', fullPath);
Expand Down

0 comments on commit 43c28ef

Please sign in to comment.