mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-13 22:44:09 +02:00
Use /opt/hostedtoolcache as default value AGENT_TOOLSDIRECTORY
This commit is contained in:
parent
ffcd00020c
commit
a8da2a66aa
2 changed files with 133 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue