Use /opt/hostedtoolcache as default value AGENT_TOOLSDIRECTORY

This commit is contained in:
Sergey Dolin
2022-04-27 11:28:44 +05:00
committed by Sergey Dolin
parent ffcd00020c
commit a8da2a66aa
2 changed files with 133 additions and 9 deletions

View File

@ -49,16 +49,13 @@ function resolveVersionInput(): string {
}
async function run() {
if (process.env.AGENT_TOOLSDIRECTORY?.trim()) {
core.debug(
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
);
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
} else {
core.debug(
`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`
);
if (!process.env.AGENT_TOOLSDIRECTORY?.trim()) {
process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
}
core.debug(
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
);
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
try {
const version = resolveVersionInput();
if (version) {