File tree 2 files changed +7
-15
lines changed
2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -65340,13 +65340,9 @@ function resolveVersionInput() {
65340
65340
function run() {
65341
65341
var _a;
65342
65342
return __awaiter(this, void 0, void 0, function* () {
65343
- // According to the README windows binaries do not require to be installed
65344
- // in the specific location, but Mac and Linux do
65345
- if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
65346
- if (utils_1.IS_LINUX)
65347
- process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
65348
- else
65349
- process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
65343
+ // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find
65344
+ // is not able to find the files cached by actions/python-version.
65345
+ if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
65350
65346
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
65351
65347
}
65352
65348
core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
Original file line number Diff line number Diff line change @@ -7,9 +7,7 @@ import fs from 'fs';
7
7
import { getCacheDistributor } from './cache-distributions/cache-factory' ;
8
8
import {
9
9
isCacheFeatureAvailable ,
10
- logWarning ,
11
- IS_LINUX ,
12
- IS_WINDOWS
10
+ logWarning
13
11
} from './utils' ;
14
12
15
13
function isPyPyVersion ( versionSpec : string ) {
@@ -68,11 +66,9 @@ function resolveVersionInput(): string {
68
66
}
69
67
70
68
async function run ( ) {
71
- // According to the README windows binaries do not require to be installed
72
- // in the specific location, but Mac and Linux do
73
- if ( ! IS_WINDOWS && ! process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
74
- if ( IS_LINUX ) process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/opt/hostedtoolcache' ;
75
- else process . env [ 'AGENT_TOOLSDIRECTORY' ] = '/Users/runner/hostedtoolcache' ;
69
+ // When setting AGENT_TOOLSDIRECTORY, the actions/tool-cache function find
70
+ // is not able to find the files cached by actions/python-version.
71
+ if ( process . env . AGENT_TOOLSDIRECTORY ?. trim ( ) ) {
76
72
process . env [ 'RUNNER_TOOL_CACHE' ] = process . env [ 'AGENT_TOOLSDIRECTORY' ] ;
77
73
}
78
74
core . debug (
You can’t perform that action at this time.
0 commit comments