Support AGENT_TOOLSDIRECTORY as in setup-python action

This commit is contained in:
thangle 2024-05-10 12:14:03 +01:00
parent c2ac33f2c6
commit c1b361d808
No known key found for this signature in database
GPG key ID: 1055755EA3C5002E
2 changed files with 13 additions and 0 deletions

View file

@ -33,6 +33,14 @@ export async function run() {
arch = os.arch();
}
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
}
core.debug(
`Node is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`
);
if (version) {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;