mirror of
https://github.com/actions/setup-python
synced 2025-04-06 23:39:42 +00:00
Exclude windows from the fix
This commit is contained in:
committed by
Sergey Dolin
parent
5d9fdcab75
commit
958897304a
@ -49,14 +49,16 @@ function resolveVersionInput(): string {
|
||||
}
|
||||
|
||||
async function run() {
|
||||
// According to the README windows binaries do not require to be installed
|
||||
// in the specific location, but Mac and Linux do
|
||||
if (!IS_WINDOWS && !process.env.AGENT_TOOLSDIRECTORY?.trim()) {
|
||||
if (IS_LINUX) process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
|
||||
else process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
|
||||
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
|
||||
}
|
||||
core.debug(
|
||||
`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`
|
||||
`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`
|
||||
);
|
||||
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
|
||||
try {
|
||||
const version = resolveVersionInput();
|
||||
if (version) {
|
||||
|
Reference in New Issue
Block a user