mirror of
https://github.com/actions/setup-python
synced 2025-04-07 07:49:45 +00:00
Use /opt/hostedtoolcache as default value AGENT_TOOLSDIRECTORY
This commit is contained in:
committed by
Sergey Dolin
parent
ffcd00020c
commit
a8da2a66aa
@ -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) {
|
||||
|
Reference in New Issue
Block a user